how to add a row number to your query in sql using row number and partition by