Changes between Version 7 and Version 8 of Advanced database reports (SQL and Stored procedures)
- Timestamp:
- 12/28/22 16:44:33 (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Advanced database reports (SQL and Stored procedures)
v7 v8 136 136 }}} 137 137 138 == Преглед на вкупниот број резервации кои ги има направено секој од корисниците138 == Преглед на бројот на резервации по категории за секој корисник 139 139 140 {{{#!sql 141 select ut.full_name , sum(gmr.reservation_id) as number_reservations 140 select ut.full_name , 141 ( 142 select count(rfa.reservation_id) 143 from reservation_for_activity rfa 144 )as number_reservations_for_activity, 145 ( 146 select count(rfe.reservation_id) 147 from reservation_for_events rfe 148 )as number_reservations_for_events, 149 ( 150 select count(rfpm.reservation_id) 151 from reservation_for_prepared_meal rfpm 152 )as number_reservations_for_meal, 153 ( 154 select count(rfs.reservation_id) 155 from reservation_for_service rfs 156 )as number_reservations_for_service 142 157 from user_table ut 143 158 join guests g … … 148 163 on gmr.reservation_id = r.reservation_id 149 164 group by 1; 150 }}} 165 166 167 151 168 152 169 == Број на соби во секоја вила