So simple query to ignore group by and having clause.. Thanks please keep it up.
super nice solution..you just got another subscriber
This is very easy without using cte and row_number partition
Hi Sir, a big fan. Why > and not = in the second where clause?
If some employees have the same name, then how this will be work. Because employee id should be unique and we can't delete the rows based on name. That's not a meaningful one π€
we can use window functions as well.
This was so simple, I used CTE and partition which is difficult compared with this one.
Simple explanation, thanks
use this delete from emp e where exists ( select 1 from emp where empname=e.empname and empid>e.empid) 1000x times faster than your query
This leetcode easy level question ..easy and medium from leetcode.is enough to crack any interview..
Better to use partition
Thank you sir πππ
How does it work internally?
Why can't we use distinct
What's this method name?
Duplicate records means empid too is same and not different
Good one man keep going..
Why cant we use distinct??
There is no colums e1 and e2 π€π€π€are these temporary names(rows)?
@Rishikesh-c9r