DBMS (SQL)
Description: SQL SQL | |
Number of Questions: 15 | |
Created by: Preeti Dasgupta | |
Tags: SQL |
Select a query to display the number of employees who can earn commission in department number 30.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the number of employees in department number 30.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the number of departments in employee table.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display hire date of the oldest employee and the newest employee.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the highest and the lowest salary for all the employees.
Consider the following relation schema ..... EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE)...
Select a query to display the average commission of employees.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the name of employees whose name ends with 'S' .
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display employee name, the number of weeks employed for all the employees in the department number 10.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the names and hire date for all the employees who joined on February 22, 1981.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display all the employees who are not clerks and not in department number 30.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display all the employees whose salary is between 1000 and 15000.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the average and sum of salaries for all employees.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the employee names, their salary and manager numbers for all the employees whose manager's employee numbers are 7902, 7566, 7788.
Consider the following relation schema:
EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);
Select a query to display the employee names, their salary along with the salary grades.
Consider the following relation schema ..... EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE). ... SALGRADE(LOSAL,HISAL,GRADE).... [NOTE::LOSAL-HISAL (i.e. low salary and high salary ) is a range for a particular grade... as example (LOSAL=2000 HISAL=4000 then GRADE=\\'A\\' ).... ]
Select a query to display employee name, job, department name, salary, and their salary grade.
Consider the following relation schema ..... EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE). ... SALGRADE(LOSAL,HISAL,GRADE).... [NOTE::LOSAL-HISAL (i.e. low salary and high salary ) is a range for a particular grade... as example (LOSAL=2000 HISAL=4000 then GRADE=\\'A\\' ).... ]