You want to round the datetime to the day. See
I am on my phone, so can’t (or won’t) do a full solution, but this should get you close
SELECT EXTRACT(DOY FROM created_at) as day
You want to round the datetime to the day. See
I am on my phone, so can’t (or won’t) do a full solution, but this should get you close
SELECT EXTRACT(DOY FROM created_at) as day