Skip to content

Instantly share code, notes, and snippets.

@jaeinkim
Created March 12, 2020 04:32
Show Gist options
  • Select an option

  • Save jaeinkim/4f971728a9fdcd53ac142c34188e76fa to your computer and use it in GitHub Desktop.

Select an option

Save jaeinkim/4f971728a9fdcd53ac142c34188e76fa to your computer and use it in GitHub Desktop.
SELECT TO_CHAR(SALES_DATE, 'YYYY-MM') YYYYMM
,COUNT(*) COUNT
FROM ORA_USER.SALES
GROUP BY TO_CHAR(SALES_DATE, 'YYYY-MM')
ORDER BY 1
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment