Changes between Version 3 and Version 4 of AdvancedReports


Ignore:
Timestamp:
02/13/24 22:16:37 (9 months ago)
Author:
201136
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v3 v4  
    5555
    5656}}}
     57
     58=== **Извештај за активни корисници според тромесечије**
     59{{{#!sql
     60
     61SELECT DATE_TRUNC('quarter', d.date) AS QuarterStart,
     62       COUNT(DISTINCT uhd.uID) AS num_users_with_activity
     63FROM _Day d
     64LEFT JOIN UserHasDays uhd ON d.dID = uhd.dID
     65LEFT JOIN DayHasWorkout dw ON d.dID = dw.dID
     66LEFT JOIN DayHasMeal dm ON d.dID = dm.dID
     67WHERE d.date >= CURRENT_DATE - INTERVAL '1 year'
     68GROUP BY QuarterStart
     69ORDER BY QuarterStart;
     70
     71
     72}}}