Professional Documents
Culture Documents
DNAME COUNT(*)
----- ----------
resea 1
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Ramez Elmasri and Shamkant Navathe Slide 8-7
SQL> select dname,count(*),sum(salary)
2 from dept,employee
3 where dnumber=dno and
4 dno in (select dno
5 from employee
6 group by dno
7 having count(*) > 1)
8 group by dname
9 having sum(salary) > 35000;
E.FNAME=DEPENDENT_NAME)
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition
Copyright © 2004 Ramez Elmasri and Shamkant Navathe Slide 8-12
SQL> select FNAME, LNAME
2 from employee1 E
3 where (select count(*)
4 from depedent
5 where ssn = E.ssn ) >= 2;
where (select count(*)
*
ERROR at line 3:
ORA-00936: missing expression