SQL Project:-
1) Write a query to get all employee detail from "EmployeeDetail"
table
2) Write a query to get only "FirstName" column from "EmployeeDetail"
table
3) Write a query to get FirstName in upper case as "First Name".
4) Write a query to get FirstName in upper case as "First Name".
5) Write a query for combine FirstName and LastName and display it as
"Name" (also include white space between first name & last name)
6) Select employee detail whose name is "Vikas
7) Get all employee detail from EmployeeDetail table whose
"FirstName" start with latter 'a'.
8) Get all employee detail from EmployeeDetail table whose
"FirstName" start with latter 'a'.
9. Get all employee details from EmployeeDetail table whose
"FirstName" end with 'h'
10. Get all employee detail from EmployeeDetail table whose
"FirstName" start with any single character between 'a-p'
11) Get all employee detail from EmployeeDetail table whose
"FirstName" not start with any single character between 'a-p'
12) Get all employee detail from EmployeeDetail table whose
"Gender" end with 'le' and contain 4 letters. The Underscore(_)
Wildcard Character represents any single character
13) Get all employee detail from EmployeeDetail table whose
"FirstName" start with 'A' and contain 5 letters
14) Get all employee detail from EmployeeDetail table whose
"FirstName" containing '%'. ex:-"Vik%as".
15) Get all unique "Department" from EmployeeDetail table
16) Get the highest "Salary" from EmployeeDetail table.
17) Get the lowest "Salary" from EmployeeDetail table
18) Show "JoiningDate" in "dd mmm yyyy" format, ex- "15 Feb 2013
19) Show "JoiningDate" in "yyyy/mm/dd" format, ex- "2013/02/15"
20) Show only time part of the "JoiningDate"
21) Get only Year part of "JoiningDate"
22) Get only Month part of "JoiningDate”
23) Get system date
24) Get UTC date.
a) Get the first name, current date, joiningdate and diff between
current date and joining date in months.
25) Get the first name, current date, joiningdate and diff between
current date and joining date in days.
26) Get all employee details from EmployeeDetail table whose
joining year is 2013
27) Get all employee details from EmployeeDetail table whose
joining month is Jan(1)
28) Get all employee details from EmployeeDetail table whose
joining month is Jan(1)
29) Get how many employee exist in "EmployeeDetail" table
31. Select only one/top 1 record from "EmployeeDetail" table
32. Select all employee detail with First name "Vikas","Ashish", and
"Nikhil".
33. Select all employee detail with First name not in
"Vikas","Ashish", and "Nikhil"
34. Select first name from "EmployeeDetail" table after removing
white spaces from right side
35. Select first name from "EmployeeDetail" table after removing
white spaces from left side
36. Display first name and Gender as M/F.(if male then M, if Female
then F)
37. Select first name from "EmployeeDetail" table prifixed with
"Hello
38. Get employee details from "EmployeeDetail" table whose Salary
greater than 600000
39. Get employee details from "EmployeeDetail" table whose Salary
less than 700000
40. Get employee details from "EmployeeDetail" table whose Salary
between 500000 than 600000
41. Give records of ProjectDetail table
42. Write the query to get the department and department wise
total(sum) salary from "EmployeeDetail" table.
43. Write the query to get the department and department wise
total(sum) salary, display it in ascending order according to salary.
44. Write the query to get the department and department wise
total(sum) salary, display it in descending order according to salary
45. Write the query to get the department, total no. of departments,
total(sum) salary with respect to department from "EmployeeDetail"
table.
46. Get department wise average salary from "EmployeeDetail" table
order by salary ascending
47 . Get department wise maximum salary from "EmployeeDetail" table
order by salary ascending
48.Get department wise minimum salary from "EmployeeDetail" table
order by salary ascending.
49. Get department wise minimum salary from "EmployeeDetail" table
order by salary ascending
50. Join both the table that is Employee and ProjectDetail based on
some common paramter
51. Get employee name, project name order by firstname from
"EmployeeDetail" and "ProjectDetail" for those employee which have
assigned project already.
52. Get employee name, project name order by firstname from
"EmployeeDetail" and "ProjectDetail" for all employee even they have
not assigned project.
53) Get employee name, project name order by firstname from
"EmployeeDetail" and "ProjectDetail" for all employee if project is
not assigned then display "-No Project Assigned"
54.Get all project name even they have not matching any employeeid,
in left table, order by firstname from "EmployeeDetail" and
"ProjectDetail
55. Get complete record (employeename, project name) from both tables
([EmployeeDetail],[ProjectDetail]), if no match found in any table
then show NULL
56. Get complete record (employeename, project name) from both tables
([EmployeeDetail],[ProjectDetail]), if no match found in any table
then show NULL
57.Get complete record (employeename, project name) from both tables
([EmployeeDetail],[ProjectDetail]), if no match found in any table
then show NULL
58.Write down the query to fetch EmployeeName & Project who has
assign more than one project
59. Write down the query to fetch ProjectName on which more than one
employee are working along with EmployeeName
60. Apply Cross Join in Both the tables