Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Dek
Starting Member
7 Posts |
Posted - 2001-11-13 : 21:02:41
|
| Here is my table needed for query.empempno | ename| hiredate | managerno | deptnoI want to query the emp table to display employees who have one or more co-workers in their department with a later hiredate but higher salaries.My reasoning is to find employees and colleagues first and then find employers with later hiredate and higher salaries. Perhaps I should take a different approach?I am able to find all workers and their colleagues:select employee.ename colleague.ename as colleaguefrom emp employee, emp colleaguewhere employee.deptno = colleague.deptnoand employee.empno <> colleague.empno; |
|
|
|
|
|