Oracle data transform using analytic lag row_number case

So I needed to transform this source data: Into this output format: Seems simple, but required a combination of CASE, LAG, and ROW_NUMBER – as Tom Kyte steps through in detail in this article from 2004. Here is the solution: SELECT q5.event_category , q5.num , MIN ( q5.week ) AS start_week , MAX ( q5.week […]

Read More Oracle data transform using analytic lag row_number case
December 17, 2014