Subversion Repositories VORC

Rev

Blame | Last modification | View Log | RSS feed

## View: v_scores
#
# +-------------+----------------------+------+-----+---------+-------+
# | Field       | Type                 | Null | Key | Default | Extra |
# +-------------+----------------------+------+-----+---------+-------+
# | id          | int(11)              | NO   |     | 0       |       |
# | date        | date                 | NO   |     | NULL    |       |
# | dayofweek   | varchar(9)           | YES  |     | NULL    |       |
# | track       | varchar(45)          | NO   |     | NULL    |       |
# | type        | varchar(45)          | NO   |     | NULL    |       |
# | time        | varchar(23)          | YES  |     | NULL    |       |
# | team1       | varchar(64)          | NO   |     | NULL    |       |
# | team1_score | smallint(5) unsigned | YES  |     | NULL    |       |
# | team2       | varchar(64)          | NO   |     | NULL    |       |
# | team2_score | smallint(5) unsigned | YES  |     | NULL    |       |
# +-------------+----------------------+------+-----+---------+-------+

CREATE OR REPLACE VIEW `v_scores` AS select distinct `game`.`id` AS `id`,`game`.`date` AS `date`,dayname(`game`.`date`) AS `dayofweek`,`game`.`track` AS `track`,`game`.`type` AS `type`,concat(convert(time_format(`game`.`time`,'%H:%i') using utf8mb4),' - ',convert(time_format(`game`.`end_time`,'%H:%i') using utf8mb4)) AS `time`,`game`.`team1` AS `team1`,`score`.`team1_score` AS `team1_score`,`game`.`team2` AS `team2`,`score`.`team2_score` AS `team2_score` from (`game` left join `score` on((`game`.`id` = `score`.`gid`))) where ((not((`game`.`type` like '%scrimmage'))) and (`game`.`type` <> 'observation')) order by `game`.`date`,`game`.`track`,`game`.`time`