add row header to query to count records
Hi all,
I have a query that has over 10k records, I would like to divide the records every 3k records to a report. I will add two columns (Row Total and Row Header) that will show total number of rows and next column want the count to reset every 3k rows. I am thinking I need to use
nvl(COUNT(*) OVER(), 0) total_rows
but I am not sure what to use to reset the count every 3k records. Any idea?