Here's my first query to shows the number of customers added per year-month
select count(name) AS CUSTOMER,
extract(year from create_date) as yr,
extract(month from create_date) as mon
from x
group by extract(year from create_date),
extract(month from create_date)
order by yr desc, mon desc;
CUSTOMER | YR | MON |
---|---|---|
3 | 2019 | 07 |
4 | 2015 | 02 |
100 | 2014 | 09 |
3 | 2014 | 04 |
I tried the query
SELECT MAX(count(*))
FROM x
GROUP BY create_date;
in the results I have;
MAX(COUNT(*)) |
---|
100 |
need to see the year and month in the result.
How to do this?