SlideShare a Scribd company logo
1. Dispaly the employee deptno working in 30 and 10joined in the year 81?
2. Display the location of smith ?
3. List the total information of employee table along with the department name and location of
all the employees working under accounts and research in the ascending order of their deptno?
4. Display the employee no,employee name , salary ,loc,department name and job of all the
employees working at CHICAGO or working for accounting department with annual salary
>28000 but the salary should not be 3000 or 2800,who doesn’t belongs to mgr and whose
number is having digit 7 or 8 in 3rd
position in the ascending order of deptno and descending
order of job.?
5. List the employee number,employee name,salary,dname,grade,experience,anuual salary of
employees working for dept 10 and 20 ?
6. List the employees whose jobs are same as ALLEN ?
7. List the employees whose jobs are same as MILLER or salaries is more than ALLEN?
8. List the employees who are senior to BLAKE working at CHICAGO and BOSTON ?
9. Display the employees whose jobs are same as SMITH or ALLEN ?
10. List the jobs of department 10 those are not found in department 20 ?
11. List the employees who joined in 81 with job same as the most senior person of year 81 ?
12. Find the total salary given to the manager?
13. List the name,job,dname,loc for those who are working as a manager?
14. List the employee whose salary is less than his manager but more than other manager ?
15. Find out least five earners of the company ?
16. Llist the employees whose first two characters from hiredate is last two characters of the
salary?
17. Display the name of the department where highest number of employees are working?
18. Display the output in a manner of ‘EMP_AND_JOB’ for ename and job?
19. Produce the following output form emp in a manner as mentioned
SMITH(clerk)
ALLEN(salesman)
20. Display the employee info in the below manner
‘just salary’ if salary is more than 1500
‘on target’ if salary is 1500 and
‘Below 1500’ if salary is less than 1500 ?
21. Which query will return the date of the week for any date entered in the format
‘DD-MMM-YY’ ?
22. Find average salary and average total of the remuneration for each job type.Remenber
salesman earns commission ?
23. List the employees who are getting less than 1000sort the output by salary ?
24. Find all the employees who earns the minimum salary for each job wise in ascending order ?
25. Find all the employees who earn the highest salary for each job type .sort in descending
order of their salaries?
26. List the number of employees and average salary with in each department for each job ?
27. Find name and job of the employees who earn maximum salary and commission ?
28. List the department no and their average salaries for department with average salary less
than the average for all departments?
29. Display the details of BLAKE ?
30. List the employees who joined in the second half of 82 ?
31. List the names ends with H all together 5 characters ?
32. List the employees whose salary is ending with ‘00’?
33. Who joined in the month having a second character as ‘A’?
34. List the employees along with the experience of those working under the MGR whose no is
starting with 7 ,but should not have a digit 9 joined 83 ?
35. List the empno,ename,sal,job of emps with the annual salary less than 3400 but receiving
some commission which should not be less than salary and designation should be SALESMAN
working for dept 30?
36. List the empno,ename,sal,job,deptno and experience of all the employees belonging to
dept 10 or 20,with an experience 6 to 10 years working under some manager without comm
with a job not ending with ‘MAN’ but sal>850 ot the emps working for dept 30 with job having a
character irrespective of the position with commission>200 with experience >7years and sal
<2500 but not belongs to the month SEP or NOV working under the MGR whose number is not
having digits either 9 or 0 inn the asc dept & desc dept ?
37. List the details of emps working at CHICAGO ?
38. List the Empno,Sal,Loc of emps working at CHICAGO,DALLAS with an Experience >
Years?
39. List the employees with Loc & grade of accounting dept or the locs Dallas or Chicago with
grades 3 to 5 & experience>6 years?

More Related Content

DOCX
All questions
DOCX
1 q on operators
DOCX
Q on subquery
DOCX
Sql Queries
PDF
SQL practice questions set
PDF
Introduction to Databases - Assignment_1
DOC
Sql task
DOC
Curriculum_Vitae Ruben
All questions
1 q on operators
Q on subquery
Sql Queries
SQL practice questions set
Introduction to Databases - Assignment_1
Sql task
Curriculum_Vitae Ruben

Similar to Sql assignment 4 (20)

DOCX
sql qn.docx
PDF
Sql queries
DOC
Sql queires
PDF
Orcl sql queries
DOC
Sql queries with answers
DOCX
Assignment 2 (16-08-2013)
PDF
Simran kaur,BCA Final Year 2015
DOC
21390228-SQL-Queries.doc
DOCX
Q on joins
PDF
Vishwajeet Sikhwal ,BCA,Final Year 2015
PDF
Vijay Kumar
PDF
Priyanka Bhatia.BCA Final year 2015
PDF
Sql queries questions and answers
PDF
Pooja Jain
PDF
Pooja Bijawat,Bachelor Degree in Computer Application
DOCX
Hands on Assignment for retrieving data using the SQL SELECT statement.docx
PDF
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
DOCX
2 q on groups
PDF
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
sql qn.docx
Sql queries
Sql queires
Orcl sql queries
Sql queries with answers
Assignment 2 (16-08-2013)
Simran kaur,BCA Final Year 2015
21390228-SQL-Queries.doc
Q on joins
Vishwajeet Sikhwal ,BCA,Final Year 2015
Vijay Kumar
Priyanka Bhatia.BCA Final year 2015
Sql queries questions and answers
Pooja Jain
Pooja Bijawat,Bachelor Degree in Computer Application
Hands on Assignment for retrieving data using the SQL SELECT statement.docx
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
2 q on groups
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Ad

Recently uploaded (20)

PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Website Design Services for Small Businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Cost to Outsource Software Development in 2025
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Operating system designcfffgfgggggggvggggggggg
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Website Design Services for Small Businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Computer Software and OS of computer science of grade 11.pptx
Designing Intelligence for the Shop Floor.pdf
history of c programming in notes for students .pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Reimagine Home Health with the Power of Agentic AI​
Cost to Outsource Software Development in 2025
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Complete Guide to Website Development in Malaysia for SMEs
Design an Analysis of Algorithms I-SECS-1021-03
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
Oracle Fusion HCM Cloud Demo for Beginners
Wondershare Filmora 15 Crack With Activation Key [2025
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Ad

Sql assignment 4

  • 1. 1. Dispaly the employee deptno working in 30 and 10joined in the year 81? 2. Display the location of smith ? 3. List the total information of employee table along with the department name and location of all the employees working under accounts and research in the ascending order of their deptno? 4. Display the employee no,employee name , salary ,loc,department name and job of all the employees working at CHICAGO or working for accounting department with annual salary >28000 but the salary should not be 3000 or 2800,who doesn’t belongs to mgr and whose number is having digit 7 or 8 in 3rd position in the ascending order of deptno and descending order of job.? 5. List the employee number,employee name,salary,dname,grade,experience,anuual salary of employees working for dept 10 and 20 ? 6. List the employees whose jobs are same as ALLEN ? 7. List the employees whose jobs are same as MILLER or salaries is more than ALLEN? 8. List the employees who are senior to BLAKE working at CHICAGO and BOSTON ? 9. Display the employees whose jobs are same as SMITH or ALLEN ? 10. List the jobs of department 10 those are not found in department 20 ? 11. List the employees who joined in 81 with job same as the most senior person of year 81 ? 12. Find the total salary given to the manager? 13. List the name,job,dname,loc for those who are working as a manager? 14. List the employee whose salary is less than his manager but more than other manager ? 15. Find out least five earners of the company ? 16. Llist the employees whose first two characters from hiredate is last two characters of the salary? 17. Display the name of the department where highest number of employees are working? 18. Display the output in a manner of ‘EMP_AND_JOB’ for ename and job? 19. Produce the following output form emp in a manner as mentioned SMITH(clerk) ALLEN(salesman)
  • 2. 20. Display the employee info in the below manner ‘just salary’ if salary is more than 1500 ‘on target’ if salary is 1500 and ‘Below 1500’ if salary is less than 1500 ? 21. Which query will return the date of the week for any date entered in the format ‘DD-MMM-YY’ ? 22. Find average salary and average total of the remuneration for each job type.Remenber salesman earns commission ? 23. List the employees who are getting less than 1000sort the output by salary ? 24. Find all the employees who earns the minimum salary for each job wise in ascending order ? 25. Find all the employees who earn the highest salary for each job type .sort in descending order of their salaries? 26. List the number of employees and average salary with in each department for each job ? 27. Find name and job of the employees who earn maximum salary and commission ? 28. List the department no and their average salaries for department with average salary less than the average for all departments? 29. Display the details of BLAKE ? 30. List the employees who joined in the second half of 82 ? 31. List the names ends with H all together 5 characters ? 32. List the employees whose salary is ending with ‘00’? 33. Who joined in the month having a second character as ‘A’? 34. List the employees along with the experience of those working under the MGR whose no is starting with 7 ,but should not have a digit 9 joined 83 ? 35. List the empno,ename,sal,job of emps with the annual salary less than 3400 but receiving some commission which should not be less than salary and designation should be SALESMAN working for dept 30? 36. List the empno,ename,sal,job,deptno and experience of all the employees belonging to dept 10 or 20,with an experience 6 to 10 years working under some manager without comm with a job not ending with ‘MAN’ but sal>850 ot the emps working for dept 30 with job having a character irrespective of the position with commission>200 with experience >7years and sal
  • 3. <2500 but not belongs to the month SEP or NOV working under the MGR whose number is not having digits either 9 or 0 inn the asc dept & desc dept ? 37. List the details of emps working at CHICAGO ? 38. List the Empno,Sal,Loc of emps working at CHICAGO,DALLAS with an Experience > Years? 39. List the employees with Loc & grade of accounting dept or the locs Dallas or Chicago with grades 3 to 5 & experience>6 years?