[go: up one dir, main page]

0% found this document useful (0 votes)
150 views22 pages

20 PySpark Problems

This document contains 20 SQL queries related to employees and departments in a company database: 1. Select employees whose first name starts with S along with their name, job ID, and salary. 2. Find employees who joined the company after the 15th of each month. 3. Display employees' first and last names in reverse order. 4. Display the 5 employees with the lowest salaries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views22 pages

20 PySpark Problems

This document contains 20 SQL queries related to employees and departments in a company database: 1. Select employees whose first name starts with S along with their name, job ID, and salary. 2. Find employees who joined the company after the 15th of each month. 3. Display employees' first and last names in reverse order. 4. Display the 5 employees with the lowest salaries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

df_dept

df_employees
1 - Select employee’s first name, last name, job_id, and
salary whose first name starts with alphabet ‘S’
2 - Find the employees who joined the company after 15th
of the month
3 - Display the employee’s first name and first name in
reverse order
4 - Display the 5 least earning employees
5 - Find the employees hired in the 80s
6 - Find the maximum salary from each department.
7 - Find employees who earn more than the average
salary in that company
8 - Find the employees who joined in August, 1994.
9 - Select employee first name and the corresponding
phone number in the format (_ _ )-( _ )-( _ _ _)
10- Select the employees whose first_name contains “an”
11- Write a query to divide people into three groups based
on their salaries
12 - Find the salary range of employees
13 - Get the count of employees hired year wise
14 - Find the count of employees in each department
15- Find count of employees under each manager in
descending order
16 - Display employees and their corresponding managers
and with their salaries
17 - Display employees first name, last name, job_id and
salary whose first name starts with alphabet S
18 - Find employee with the highest salary
19 - Fetch employees with the nth highest salary
20 - Find the managers and the reporting employees who
work in different departments

You might also like