Changes between Version 1 and Version 2 of Internal/cProcedures/aGeneratingReports
- Timestamp:
- Apr 7, 2016, 12:22:41 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/cProcedures/aGeneratingReports
v1 v2 1 1 = Generating Usage Reports = 2 To get total reservations on all machines in minutes for certain period: 3 {{{ 4 SELECT 5 sum((reservations.end_date + (reservations.endTime * 60))-(reservations.start_date + (reservations.startTime * 60)))/60 duration 6 FROM reservations 7 WHERE unix_timestamp('2000-01-01') <=(reservations.start_date + (reservations.startTime * 60)) AND 8 unix_timestamp('2016-03-31') >= (reservations.end_date + (reservations.endTime * 60)) 9 AND is_pending = 0; 10 11 12 }}}