SlideShare a Scribd company logo
1 of 3
Download to read offline
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

Similar to Sql assignment 4 (12)

Sql queries questions and answers
Sql queries questions and answersSql queries questions and answers
Sql queries questions and answers
 
SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3
 
DBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR SchemaDBMS 5 | MySQL Practice List - HR Schema
DBMS 5 | MySQL Practice List - HR Schema
 
sql qn.docx
sql qn.docxsql qn.docx
sql qn.docx
 
Sql query file work
Sql query file workSql query file work
Sql query file work
 
SQL practice questions set - 2
SQL practice questions set - 2SQL practice questions set - 2
SQL practice questions set - 2
 
SQL Practice Question set
SQL Practice Question set SQL Practice Question set
SQL Practice Question set
 
Orcl sql queries
Orcl sql queriesOrcl sql queries
Orcl sql queries
 
SQL case study Analysis PPT by Radhika Kashidd
SQL case study Analysis PPT by Radhika KashiddSQL case study Analysis PPT by Radhika Kashidd
SQL case study Analysis PPT by Radhika Kashidd
 
Pooja Jain
Pooja JainPooja Jain
Pooja Jain
 
SQL BASIC QUERIES
SQL  BASIC QUERIES SQL  BASIC QUERIES
SQL BASIC QUERIES
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015
 

Recently uploaded

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 

Recently uploaded (20)

cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 

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?