|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Learn four approaches for automating Excel logic, along with advantages and disadvantages of each. Read all about it in the free whitepaper: “Tapping into Excel Logic from Java: Four Server-Based Alternatives” Download Now! |
|
#1
|
|||
|
|||
|
Query Problems
Hi
I have been trying these queries on scott. select e.ename,e.deptno from emp e,salgrade g,(select deptno,count(*) total from emp group by deptno)d where e.sal between g.losal and g.hisal and g.losal=(select min(losal) from salgrade) and d.total>2 and e.deptno=d.deptno Does this qquery inclde where there is more than 2 employees And the following query select d.deptno,d.dname,d.loc from emp e,dept d where d.deptno=e.deptno and e.job='CLERK' In the output it does not give the details of clerks and there is repeated data which states: 20 reserach dallas 20 reserach dallas Can anyone advise me on these queries? |
|
#2
|
|||
|
|||
|
Question: Does this qquery inclde where there is more than 2 employees
select e.ename,e.deptno from emp e,salgrade g,(select deptno,count(*) total from emp group by deptno)d where e.sal between g.losal and g.hisal and g.losal=(select min(losal) from salgrade) and d.total>2 and e.deptno=d.deptno Yes it does. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Query Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|