Subversion Repositories VORC

Rev

Blame | Last modification | View Log | RSS feed

## View: v_mvp_class
#
# +------------+-------------+------+-----+---------+-------+
# | Field      | Type        | Null | Key | Default | Extra |
# +------------+-------------+------+-----+---------+-------+
# | note       | mediumtext  | YES  |     | NULL    |       |
# | date       | date        | YES  |     | NULL    |       |
# | dayofweek  | varchar(9)  | YES  |     | NULL    |       |
# | start_time | time        | YES  |     | NULL    |       |
# | end_time   | time        | YES  |     | NULL    |       |
# | time       | varchar(23) | YES  |     | NULL    |       |
# | location   | varchar(45) | YES  |     | NULL    |       |
# | role       | varchar(45) | YES  |     | NULL    |       |
# | totalspots | bigint(21)  | NO   |     | 0       |       |
# | available  | bigint(22)  | NO   |     | 0       |       |
# +------------+-------------+------+-----+---------+-------+

CREATE OR REPLACE VIEW `v_mvp_class` AS select `v_shift`.`note` AS `note`,`v_shift`.`date` AS `date`,`v_shift`.`dayofweek` AS `dayofweek`,`v_shift`.`start_time` AS `start_time`,`v_shift`.`end_time` AS `end_time`,`v_shift`.`time` AS `time`,`v_shift`.`location` AS `location`,`v_shift`.`role` AS `role`,count(0) AS `totalspots`,(count(0) - count(`v_shift`.`RCid`)) AS `available` from `v_shift` where (`v_shift`.`dept` = 'CLA') group by `v_shift`.`note`,`v_shift`.`dayofweek`,`v_shift`.`start_time` order by `v_shift`.`date`,`v_shift`.`start_time`