Dashboard Report - Signups

This is an SQL version of the Admin Dashboard Report for Signups.

The SQL report will count the number of users who have joined a forum each day between two dates, :start_date and :end_date, which are parameters that can be adjusted according to the reporting needs.

-- [params]
-- date :start_date
-- date :end_date

SELECT
    u.created_at::date AS Day,
    Count (id) 
FROM users u
WHERE
    u.created_at::date BETWEEN :start_date::date AND :end_date::date
GROUP BY u.created_at::date

Example Results

day count
2023-01-01 12
2023-01-02 13
2023-01-03 17
2023-01-04 30
2023-01-05 12
2023-01-06 5
2023-01-07 9
5 Likes