SQL Query 01
SQL Query 01
2 Display employees having salaries less than 2400 and hiring year greater than 2005.
4 How to display employees whose salary is between 1500 and 2500 without using between operators?
6 Delete employees from department Purchasing and salary less than 2500.
7 Display first name, last name and salary of an employee who is having a max salary.
8 What is the Query to fetch the last record from the employees table?
9 What is the Query to fetch the first record from the Employee table?
10 What is Query to display the last 5 Records from the Employee table?
16 Display the list of employees having the first names ‘David’ or ‘Diana’ without using like, in,and or operators.
(Hint Any/ All Operator)
17 Display department name having the sum of employees salary is greater than 2500 and employees count is
less than 10
18 Write SQL query to update employees’ salary by 15% and the Region of employees should be Asia
19 Write SQL query to create the EMPLOYEES_1 table, which is exact replica of the Employees table
21 Write a query to display a list of employees having a salary greater than Max salary defines for respective
JOB_ID.
22 Write a query to count the number of rows in the table without using the count function?
23 Write a query to display department-wise max salary Output columnsà EMP_ID, FIRST_NAME, SALARY,
DEPARTMENT
24 Write a query to display department-wise 2nd max salary Output columns EMP_ID, FIRST_NAME, SALARY,
DEPARTMENT
25 From string '[email protected], display only Firstname_lastname
26 dd/mm/yyyy format in table, we want to display employee who joined in year 2008
27 4th max salary
28 What will be the query for delete rows from the table
29 Write query to display employee name with their previous designation and year
31 Suppose there is column contains 1.aShok 2.Ashok 3.ASHOK 4.aSHOKE 5.santosh 6.vinayak and we have
to display a= 4, s= 1 and v= 1
32 I want output like pravin trainee, sr.engg, lead. What will be the query
33 There are 10 records in table out of which 4 are duplicate, if we delete duplicate records then how many
records will remains in table
34 Add column in existing table
39 Display city name from city column which ends with 'pur'
43 Calculate total salary which is sum of salary and commision, if in commision column we have null value then
how it will be calculated
44 DISPLAY NTH RECORDS"
64 display rownum"
69 In bank data base we have four table as 1.Loan 2.fraud_counstomer 3.FD_coustomer 4.Coustomer master
table We need to find out a)all the FD_coustomers and Loan_coustomers b)List all the FD_coustomers
including the coustomers who have taken loan and the amount of loan C) all the coustomers who hav
come in all three categories
70 RETURN TO MAXIMUM SALARY FROM THE TABLE"
86 Write a query to display EMPLOYEES having ID 101,102,103 as per the below order: (Hint:
1. 101
2. 103
3. 102
87 One column contains 'null values', we have to replace null values by 'unknown'