Subversion Repositories VORC

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 - 1
## View: v_scores
2
#
3
# +-------------+----------------------+------+-----+---------+-------+
4
# | Field       | Type                 | Null | Key | Default | Extra |
5
# +-------------+----------------------+------+-----+---------+-------+
6
# | id          | int(11)              | NO   |     | 0       |       |
7
# | date        | date                 | NO   |     | NULL    |       |
8
# | dayofweek   | varchar(9)           | YES  |     | NULL    |       |
9
# | track       | varchar(45)          | NO   |     | NULL    |       |
10
# | type        | varchar(45)          | NO   |     | NULL    |       |
11
# | time        | varchar(23)          | YES  |     | NULL    |       |
12
# | team1       | varchar(64)          | NO   |     | NULL    |       |
13
# | team1_score | smallint(5) unsigned | YES  |     | NULL    |       |
14
# | team2       | varchar(64)          | NO   |     | NULL    |       |
15
# | team2_score | smallint(5) unsigned | YES  |     | NULL    |       |
16
# +-------------+----------------------+------+-----+---------+-------+
17
 
18
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`