Hi,
I have a database from which I am retrieving first 10 rows for each group using the 'With' table clause.
e.g
I want to insert the rows retrieved from above query into another table.
Can someone help me with this?
Thanks in advance.
I have a database from which I am retrieving first 10 rows for each group using the 'With' table clause.
e.g
Code:
with data ( select row_number() over (partition by state) as num, state id, name, ssn from state_population ) select * from data where num <= 10
Can someone help me with this?
Thanks in advance.
Comment