Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query for values , grouped by year

CORNELL RAJan 16 2025

HI all,

I am trying to generate a query to do a count of all rows based on year. The values in the row are captured as ‘yyyymmdd’ and ideally I could output by year in the following format:

Year Count

– – – – – –

2010 500

2011 600

2012 700

the data goes back to pre 2000 but rather than trying to explicitly identify the ranges, is there a more elegant way to achieve the above?

Thanks for all the help!

Comments
Post Details
Added on Jan 16 2025
8 comments
1,135 views