Created
August 6, 2020 18:42
-
-
Save ogiovannyoliveira/855c98525816183fcfacd1fc64850aec to your computer and use it in GitHub Desktop.
Searching and grouping datas per date, and formatting the date to day/month.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
count(*) as total, | |
TO_CHAR(the_date_here, 'DD/MM') as create_at | |
FROM | |
tabela | |
WHERE | |
the_date_here::date > CURRENT_DATE - 7 | |
GROUP BY create_at | |
ORDER BY create_at ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment