21. Find employees in the IT department earning more than 50000.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

22. Show the maximum salary in the Marketing department.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

23. List employees who joined in the month of September.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

24. Display employee details by grouping them by department.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

25. Retrieve the last 2 entries in the Employees table.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

26. Select employees with names ending in 'a'.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

27. List employees with a salary that is a multiple of 5000.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

28. Show the employee with the earliest Joining_Date.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

29. Update the salary of 'Rajesh' to 55000.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

30. Delete an entry where the Department is 'HR'.

Code In Sql

-- Table Name : Employees -- ID | Name | Department | Salary | Joining_Date -- ----+---------+------------+--------+-------------- -- 1 | Rajesh | IT | 50000 | 2020-01-10 -- 2 | Sneha | HR | 45000 | 2019-04-12 -- 3 | Kiran | Finance | 52000 | 2021-08-23 -- 4 | Priya | Marketing | 48000 | 2018-06-15 -- 5 | Arjun | IT | 53000 | 2022-09-19 -- Your Query Here

Run Code?

Click Run Button to view compiled output

ad vertical

3 of 3