Subversion Repositories VORC

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 - 1
## View: v_mvp_class
2
#
3
# +------------+-------------+------+-----+---------+-------+
4
# | Field      | Type        | Null | Key | Default | Extra |
5
# +------------+-------------+------+-----+---------+-------+
6
# | note       | mediumtext  | YES  |     | NULL    |       |
7
# | date       | date        | YES  |     | NULL    |       |
8
# | dayofweek  | varchar(9)  | YES  |     | NULL    |       |
9
# | start_time | time        | YES  |     | NULL    |       |
10
# | end_time   | time        | YES  |     | NULL    |       |
11
# | time       | varchar(23) | YES  |     | NULL    |       |
12
# | location   | varchar(45) | YES  |     | NULL    |       |
13
# | role       | varchar(45) | YES  |     | NULL    |       |
14
# | totalspots | bigint(21)  | NO   |     | 0       |       |
15
# | available  | bigint(22)  | NO   |     | 0       |       |
16
# +------------+-------------+------+-----+---------+-------+
17
 
18
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`