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

Similar to Sql assignment 4 (20)

DOCX
sql qn.docx
HarshalMathur
 
PDF
Sql queries
Preeti Lakhani
 
DOC
Sql queires
MohitKumar1985
 
PDF
Orcl sql queries
ssuser5c7be2
 
DOC
Sql queries with answers
vijaybusu
 
DOCX
Assignment 2 (16-08-2013)
Sanjay Pathak
 
PDF
Simran kaur,BCA Final Year 2015
dezyneecole
 
DOC
21390228-SQL-Queries.doc
SatishReddy212
 
DOCX
Q on joins
ABHIJEET KHIRE
 
PDF
Vishwajeet Sikhwal ,BCA,Final Year 2015
dezyneecole
 
PDF
Vijay Kumar
dezyneecole
 
PDF
Priyanka Bhatia.BCA Final year 2015
dezyneecole
 
PDF
Sql queries questions and answers
Michael Belete
 
PDF
Pooja Jain
dezyneecole
 
PDF
Pooja Bijawat,Bachelor Degree in Computer Application
dezyneecole
 
PDF
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
dezyneecole
 
DOCX
2 q on groups
ABHIJEET KHIRE
 
PDF
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
dezyneecole
 
PDF
Nikhil Khandelwal BCA 3rd Year
dezyneecole
 
sql qn.docx
HarshalMathur
 
Sql queries
Preeti Lakhani
 
Sql queires
MohitKumar1985
 
Orcl sql queries
ssuser5c7be2
 
Sql queries with answers
vijaybusu
 
Assignment 2 (16-08-2013)
Sanjay Pathak
 
Simran kaur,BCA Final Year 2015
dezyneecole
 
21390228-SQL-Queries.doc
SatishReddy212
 
Q on joins
ABHIJEET KHIRE
 
Vishwajeet Sikhwal ,BCA,Final Year 2015
dezyneecole
 
Vijay Kumar
dezyneecole
 
Priyanka Bhatia.BCA Final year 2015
dezyneecole
 
Sql queries questions and answers
Michael Belete
 
Pooja Jain
dezyneecole
 
Pooja Bijawat,Bachelor Degree in Computer Application
dezyneecole
 
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
dezyneecole
 
2 q on groups
ABHIJEET KHIRE
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
dezyneecole
 
Nikhil Khandelwal BCA 3rd Year
dezyneecole
 

Recently uploaded (20)

PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Tally software_Introduction_Presentation
AditiBansal54083
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
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?