0% found this document useful (0 votes)
5 views

Mysql 13Sept

The document contains a series of SQL query instructions aimed at retrieving specific employee data based on various conditions such as salary, job title, and joining dates. It includes tasks like filtering employees by salary ranges, job characteristics, and generating email addresses based on employee names and job titles. Additionally, it covers aggregating total salaries and listing employees based on their joining dates and experience levels.

Uploaded by

Ashu Spűñk
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Mysql 13Sept

The document contains a series of SQL query instructions aimed at retrieving specific employee data based on various conditions such as salary, job title, and joining dates. It includes tasks like filtering employees by salary ranges, job characteristics, and generating email addresses based on employee names and job titles. Additionally, it covers aggregating total salaries and listing employees based on their joining dates and experience levels.

Uploaded by

Ashu Spűñk
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

To list all records with sal > 2000 and comm>200

2.To list all record with job=’Clerk’ or sal>2000

3.To list all the record with sal=1250 or 1100 or 2850

4.To list all employees with sal>1250 and <2850

5.To list all employees with name ends with AS

6.To list all employees with job starts with C and ends with K

7.To list all employees with job contains L at third position and M at third last
position

8.To list all the record with sal not equal to 1250 or 1100 or 2850

9.To list all employees with sal <1250 and <2850

10.To list all employees with job starts with C , E at 3rd position and ends with
K

11.To list all rows with comm is null

12.To list all employees with sal is null and name starts with ‘S’

13.To list all employees with job contains 5 characters

===================================================================================
========================================================================
14.To list all employees with name contain ‘A’ at 1 position and job Contains 5
characters

01- Retrieve the details(Name,Salary and dept no) of the emp who are working in
department code 20,30 & 40

02- Display the total salary of all employees.Total salary will be calculated as
sal+comm+sal*0.10

03- List the Name and job of the emp who have joined before 1 jan 1986 and whose
salary range is between 1200and 2500. Display the columns with user defined Column
headers.

04-List the empno, name, and department number of the emp works under manager with
id 7698
05-List the name, job, and salary of the emp who are working in departments 10 and
30.

06-Display name concatenated with dept code separated by comma and space. Name the
column as ‘Emp info’.

07-Display the emp details who do not have manager.

08-Write a query which will display name, department no and date of joining of all
employee who were joined January 1, 1981 and March 31, 1983. Sort it based on date
of joining (ascending).

09-Display the employee details where the job contains word ‘AGE’ anywhere

10-List the details of the employee , whose names start with ‘A’ and end with ‘S’
or whose names contains N as the second or third character, and ending with either
‘N’ or ‘S’.

===================================================================================
===============================================================================
1.To list all employees and their email, to generate email use 2 to 5 characters
from ename Concat it with 2 to 4 characters in job and then concat it with
‘@mycompany.com’

2.List all employees who joined in September.

3.List the empno, name, and department number of the emp who have experience of 18
or more years and sort them based on their experience.

4.Display the employee details who joined on 3rd of any month or any year

5.Display all employees who joined between years 1981 to 1983.

You might also like