|
|
30 |
CREATE OR REPLACE VIEW `v_shift_announcer` AS select `game`.`id` AS `id`,concat_ws('',`game`.`title`,`game`.`team1`,' vs. ',`game`.`team2`) AS `teams`,`game`.`date` AS `date`,dayname(`game`.`date`) AS `dayofweek`,concat(convert(time_format(`game`.`time`,'%H:%i') using utf8mb4),' - ',convert(time_format(`game`.`end_time`,'%H:%i') using utf8mb4)) AS `time`,`game`.`time` AS `start_time`,`game`.`end_time` AS `end_time`,(trim((time_to_sec(timediff(`game`.`end_time`,`game`.`time`)) / 3600)) + 0) AS `volhours`,`game`.`track` AS `track`,`game`.`level` AS `level`,`game`.`restrictions` AS `restrictions`,`game`.`type` AS `gtype`,`staff_template`.`assignment` AS `signup`,`game`.`notes` AS `notes`,`staff_template`.`role` AS `role`,`role`.`TLA` AS `tla`,`role`.`name` AS `name`,`role`.`type` AS `type`,`official`.`RCid` AS `RCid`,`official`.`derby_name` AS `derby_name`,`official`.`real_name` AS `real_name`,`official`.`email` AS `email` from ((((`game` join `staff_template` on((`game`.`type` = `staff_template`.`type`))) left join `assignment` on(((`game`.`id` = `assignment`.`Gid`) and (`staff_template`.`role` = `assignment`.`role`)))) left join `role` on((`role`.`TLA` = substring_index(`staff_template`.`role`,'-',1)))) left join `official` on((`assignment`.`RCid` = `official`.`RCid`))) where (`role`.`type` = 'announcer') order by `game`.`date`,`game`.`track`,concat(convert(time_format(`game`.`time`,'%H:%i') using utf8mb4),' - ',convert(time_format(`game`.`end_time`,'%H:%i') using utf8mb4)),`game`.`type`,`role`.`TLA`,`official`.`derby_name`
|