Pre Interview Assignment Data Analyst - Albanero
Pre Interview Assignment Data Analyst - Albanero
ID Name
24 ABCD
27 DEFG
31 HIJKL
Expected output:
Missing ID
25
26
28
29
30
Please go through the following tables for answering the next 3 questions(P2- P4):
P2: Write a query to retrieve Departments who have less than 2 employees working in it.
P3: Write a query to retrieve EmpPostion along with total salaries paid for each of them.
P4: Write a query to find the 3rd highest salary from the Employee Position table without using
TOP/limit keyword.
P5: Write a SQL query to find the median salary of each company without using any built-in
SQL functions
Id Company Salary
1 A 2341
2 A 341
3 A 15
4 A 15314
5 A 451
6 A 513
7 B 15
8 B 13
9 B 1154
10 B 1345
11 B 1221
12 B 234
13 C 2345
14 C 2645
15 C 2645
16 C 2652
17 C 65
Expected Output:
Id Company Salary
5 A 451
6 A 513
12 B 234
9 B 1154
14 C 2645