The document describes a tutorial on SQL data manipulation statements. It provides sample EMP and DEPT tables and then lists 26 queries to perform on those tables including selecting employee names, salaries, departments; finding salespeople in a specific department; ordering results; filtering on names; calculating totals; and more.
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
36 views
Database - Tutorial
The document describes a tutorial on SQL data manipulation statements. It provides sample EMP and DEPT tables and then lists 26 queries to perform on those tables including selecting employee names, salaries, departments; finding salespeople in a specific department; ordering results; filtering on names; calculating totals; and more.
1. List all the salesmen name, salary and department no
2. List all salesmen number, job and hiredate 3. Find all the salesmen in department 30 4. Find all the salesmen who have a salary greater than or equal to 1500. 5. List the names of all staffs who are managers 6. List the employee id and names of all staffs who have no assigned manager. 7. List the names of all staffs who has zero commission. 8. List all salesmen name in descending order use order by 9. List all salesmen in descending order of their salary. 10. List the details of employees whose name starts with S 11. List the details of employees whose has the character N in their name. 12. List the details of employees who has the character S as the last in their name. 13. List the details of employees who has L as the second character in their name. 14. Find the total salary paid to all the employees 15. Find the total salary paid to department 10 16. Find the total salary paid to managers 17. Find the maximum salary paid to salesmen 18. Find the average salary paid in the company 19. Find the average salary paid to department 20 20. List the details of all employees whose salary is in the range of 2200 to 2900 21. What is the managers name of department 20 22. List the details of all employees who works for department 20 and earns more than 2000 as salary 23. How many departments are there in this organization 24. List the details of all employees with salary and commission as one column (salary + commission) 25. List the details of employees based on department and within department based on salary 26. How many employees are there in this organization