Hi sir, when I use this ROW_NUMBER() function in mysql it work for me to display all records, >select s. *, ROW_NUMBER () OVER(order by fees DESC) as rownum from student s; But problem here is if we want to find second largest fees from table using Bellow query then I will get error, > select * from (select *.s, ROW_NUMBER() OVER(ORDER BY fees desc) as rownumber from student s) where rownumber=2; Can you please clear my doubts sir?
Thnx for video pls create microservices series
If there is duplicate salary then It will not work it is better to use dense_rank
yes you right
Hi sir, when I use this ROW_NUMBER() function in mysql it work for me to display all records,
>select s. *, ROW_NUMBER () OVER(order by fees DESC) as rownum from student s;
But problem here is if we want to find second largest fees from table using Bellow query then I will get error,
> select * from (select *.s, ROW_NUMBER() OVER(ORDER BY fees desc) as rownumber from student s) where rownumber=2;
Can you please clear my doubts sir?