Changes between Version 1 and Version 2 of Internal/cProcedures/aGeneratingReports


Ignore:
Timestamp:
Apr 7, 2016, 12:22:41 PM (9 years ago)
Author:
Olivera Tosic
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/cProcedures/aGeneratingReports

    v1 v2  
    11= Generating Usage Reports =
     2To get total reservations on all machines in minutes for certain period:
     3{{{
     4SELECT
     5sum((reservations.end_date   + (reservations.endTime * 60))-(reservations.start_date + (reservations.startTime * 60)))/60 duration
     6FROM reservations
     7WHERE unix_timestamp('2000-01-01') <=(reservations.start_date + (reservations.startTime * 60))  AND
     8unix_timestamp('2016-03-31') >= (reservations.end_date   + (reservations.endTime * 60))
     9AND is_pending = 0;
     10
     11
     12}}}