SQL Quiz 2
SQL Quiz 2
1. Print DNAME, EMPNO, ENAME for each employee from EMP table as in the example below. (Do not print employee without department when joining tables)
1 | SELECT DNAME, EMPNO,ENAME |
2. Print DNAME, EMPNO, ENAME for each employee from EMP table as in the example below. (Print employee without department when joining tables)
1 | SELECT DNAME, EMPNO,ENAME |
3. Print employee information in the department location ‘DALLAS’, ‘CHICAGO’ as in the example below.
1 | SELECT dept.loc, emp.deptno, emp.ename |
4. Print max SAL value in the department as in the example below. (Do not print employee without department)
1 | SELECT deptno, MAX(sal) as SAL |
5. Print employee information receiving the max SAL value in the department as the example below. (Except employee without department)
1 | SELECT deptno, sal ,empno , ename, job |