[development] SQL Query Doubt
rob at torenware.com
Sat Apr 16 21:29:54 UTC 2011
On 04/16/2011 05:28 AM, Ivan Sergio Borgonovo wrote:
> select t1.eid from test.employee t1
> join test.employee t2 on t1.eid=t2.eid
> where t1.skill='Java' and t2.skill='PHP'
> group by t1.eid
You can do a little better than that, I think, but a similar idea:
from employee t1
inner join employee t2 on t1.eid = t2.eid and t2.skill = 'Java'
where t1.skill = 'PHP';
No need for the group by.
More information about the development