2 ms·
I'd love to know this too. I provided an example elsewhere in this discussion of a potentially-complex query I implemented with window functions. I wanted to d
by JohnBooty 12y ago
I'd love to know this too. I provided an example elsewhere in this discussion of a potentially-complex query I implemented with window functions.
I wanted to do something like returning every row with a row_number between 1 and 3 - but discovered I couldn't put this into the WHERE clause.
The solution I came up with was to define a CTE where one of the columns is the result of the row_number() function, and then I did a SELECT on the CTE that included the WHERE functionality I needed.