Changes between Version 3 and Version 4 of AdvancedDatabaseReports


Ignore:
Timestamp:
12/19/22 17:14:52 (2 years ago)
Author:
181085
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedDatabaseReports

    v3 v4  
    88
    99{{{#!sql:
    10 SELECT d.driver_id, SUM(d.km_travelled) as km_travelled_with_driver, SUM(pay.total_sum_payed) as total_price_paid
     10SELECT d.driver_id, SUM(d.km_travelled) as km_travelled_with_driver,
     11SUM(pay.total_sum_payed) as total_price_paid
    1112FROM request r
    1213JOIN drive d ON r.request_id = d.request_id
    1314JOIN payment pay ON pay.passenger_id = r.passenger_id
    14 WHERE r.passenger_id = '77d9c766-e0c1-4e53-86d0-bafc3101a1ac' AND d.start_time between now() and now() - interval '2 months'
     15WHERE r.passenger_id = '77d9c766-e0c1-4e53-86d0-bafc3101a1ac' AND
     16d.start_time between now() and now() - interval '2 months'
    1517GROUP BY d.driver_id }}}