01
About this report
For each of the last 24 months, the number of top-level customers whose first sale fell in that month, and the total number of customers who have ever bought, counted from the first sale on record.
Group by Quarter or Year to add up new customers. Customers to date shows for months only, because it is a running total and cannot be added across months.
02
Sample preview
Fictional figures in the shape you will see. Yours come from your account.
| Month | New customers | Customers to date |
|---|---|---|
| 2026-04 | 7 | 318 |
| 2026-05 | 11 | 329 |
| 2026-06 | 6 | 335 |
| 2026-07 | 9 | 344 |
| 2026-08 | 12 | 356 |
| 2026-09 | 5 | 361 |
03
The SuiteQL
This is the query each report runs. Read it, copy it, or change it after import.
SELECT period, new_customers, customers_to_date
FROM (SELECT m.period,
m.new_customers,
SUM(m.new_customers) OVER (ORDER BY m.period) AS customers_to_date
FROM (SELECT TO_CHAR(c.firstsaledate, 'YYYY-MM') AS period,
COUNT(*) AS new_customers
FROM customer c
WHERE c.firstsaledate IS NOT NULL
AND c.parent IS NULL
GROUP BY TO_CHAR(c.firstsaledate, 'YYYY-MM')) m)
WHERE period >= TO_CHAR(ADD_MONTHS(TRUNC(SYSDATE, 'MM'), -23), 'YYYY-MM')
ORDER BY period04