News
In MySQL it's about 4 seconds vs. about 1.5 minutes. I believe MySQL is creating a temporary table with the entire contents of the subquery where as SQL Server's optimizer is doing something smarter.
What is window function vs subquery in SQL? In summary, subqueries and window functions are used for different purposes in SQL, and each has its strengths and weaknesses.
Results that may be inaccessible to you are currently showing.
Hide inaccessible results