|
|
|
Re: order of operations in the below statements [message #659905 is a reply to message #659903] |
Fri, 03 February 2017 03:25 |
cookiemonster
Messages: 13925 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The first is giving employees who's salary is greater than the average for their department.
It seems you want employees who's salary is greater than the average across everyone.
If so the second one does that, but probably not very efficiently.
Remove the where clause of the sub-query in the first as LF suggested.
|
|
|