|
|
-
This challenge is about finding second highest salary for each department...
|
-
I didn't even test this....
|
-
I didn't even test this....
|
-
Keith L Commented 2 Years ago through Puzzles
I learned this recently when working with a different data source. I expect this version not to time out.
Instead of using a correlated subquery, I made the magic happen in the join.
|
-
Keith L Solved 2 Years ago through Puzzles
I learned this recently when working with a different data source. I expect this version not to time out.
Instead of using a correlated subquery, I made the magic happen in the join.
|
-
Keith L Commented 2 Years ago through Puzzles
I used a with statement to get a signed amount (neg for payments) and create a rownumber for the sort.
then in main, I got the 4 main columns and used a sum(signed amount) where custid = custid and rownum(outside)<=rownum.
|
-
Keith L Solved 2 Years ago through Puzzles
I used a with statement to get a signed amount (neg for payments) and create a rownumber for the sort.
then in main, I got the 4 main columns and used a sum(signed amount) where custid = custid and rownum(outside)<=rownum.
|