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

SQL Important Questions

This document contains over 50 questions about SQL queries related to selecting data, filtering, sorting, aggregation, updating records, joining tables, and other SQL operations on employee data.

Uploaded by

mannykumae261
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

SQL Important Questions

This document contains over 50 questions about SQL queries related to selecting data, filtering, sorting, aggregation, updating records, joining tables, and other SQL operations on employee data.

Uploaded by

mannykumae261
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

SQL Important Questions

 Read the Employees name whose salary is Rs.10000?


 Give me employees name whose salary is greater than and
equal Rs.10000?
 Give me the Employees name whose Salary Rs.5000 and
Rs.2000?
 Give me the Employees ID whose name is Smith and Carl?
 Filter the record using having command and give the EID whose
name is Manny?
 Sort Employees ID in Descending Order.
 Sort Employees name in Descending order.
 Sort Employees name in Ascending order.
 Sort Employees ID in Descending order.
 Give me Maximum Salary from the table.
 Give me Minimum Salary from the table.
 Give me Average Salary from the table.
 Give me the SUM of all the salary.
 Count the number of employees in your company.
 Group the employees based on city and then count city wise
and print the count in ascending order.
 Count No. of cities and sort the count in ascending order.
 Group the candidates based on age.
 Convert all the employees name in Upper case.
 Convert all the employees name in Lower case.
 Give me only the First Record in the table.
 Give me First three letters from location in the table.
 Change Column Name Location to city.
 Give me output of name Which ends with m letter.
 Give me the employees name whose name consist letter m.
 Give me the name of employees that starts with letter “s”.
 Give me Name the employees which consist of three letters.
 Give me the employees which consist of five letters.
 Give me the employees which consist of three including m.
 Delete the employees whose ID is 1.
 Delete the record from employees table where employees ID
Is 101 and 102.
 Delete a record from employees table where employee name is
Smith.
 Drop the table employee.
 Give me the unique city name from the table.
 Give me the Distinct salary from the employees table.
 Concat Employee name and salary and then print the output.
 Separate Employee name and salary with an underscore and
then concat the content of these column.
 Remove whitespace from left of employee name.
 Remove whitespace from Right of employee name.
 Remove whitespace from both right and left of employee
name.
 Remove whitespace from both right and left of employee
name, Salary and then concat then separated with underscore.
 Concat employee name and salary and print the output in
descending order.
 Sort the employee’s name in ascending order.
 Update the record where employee’s name is smith to Manny.
 Update the record where employee’s name is smith to john
where Employees Id is 101 and 106.
 Update the employee id 101 to 110.
 Replace the city name Bengaluru to Lucknow in the table.
 Delete the record from the table wherever find employee name
smith.
 Delete the record whosever salary is 12000,
 Update everyone salary by rs.2000.
 Decrease everyone salary by 30000.
 Add a column to the existing table.
 Delete the column email in the table.
 Delete the column whose name is Ename.
 Find the length of each and every employee from the table.
 Give me second maximum salary.
 Give me third maximum salary.
 Give me the employee’s name who got incentive.
 Give me the employee’s name who are not married.
 Give me the Female employee’s name in the table.
 Give me the employee’s name who got incentive greater than
and equal to RS.5000.
 Give me the employee’s name who has married and got
incentives.
 Give me the marital Status of the employees whose salary if
greater than RS.10000.
 Give me the Employee’s name who did not get incentives.
 Creating table in the database by query.
 Insert data in the table.
 Subtracting two tables in MySQL.
 Give me matching records from both the tables.
 Give me the matching record and display from class, location
and employee’s ID.
 Subtract two table and give me all employee’s name from the
table.
 Give me employee’s name, employee’s ID, department,
location, attendance date and class only if record is common.
 Give me employee name, department and attendance such
that all the record are display from the table and only matching
records are display from right table.
 Give me employee name, department and attendance such
that all the record are display from the table and only matching
records are display from left table.

You might also like