Let's say I have a table of orders with fields: user_id, created_at.
I want to create a query that shows how many NEW user_id appeared per day.
This shows how many orders were in a day:
SELECT count(1), TO_CHAR(created_at, 'YYYY-MM-DD') as day FROM orders GROUP BY day ORDER BY day DESC
source share