Why Row_number failed?
Using rank over works, can anyone help me understand why switching to row_number failed for this problem??  From my understanding there should not be any differ
Using rank over works, can anyone help me understand why switching to row_number failed for this problem??  From my understanding there should not be any difference using the two in this case. \n\n```\nselect  product_id, year as first_year, quantity, price from\n(select product_id, year, quantity, price, rank()over(partition by product_id order by year asc) as year_rank from Sales)tmp\nwhere year_rank = 1\n```
[]