You are on page 1of 3

Question 1: (7 min)

Consider the 2 tables below:


Table1 Table2
EmpID Ph.no EmpID Address
1 1E+10 1 A
1 9.85E+09 2 G
2 9.82E+09 2 H
3 9.82E+09 5 J
4 9.89E+09 1 F

Q 1.a: What is the output of inner join of these 2 tables on 'EmpID'?


Q 1.b: What is the output of left join of these 2 tables on 'EmpID'?

Question 2: (5 min)
Table 3 Table 4
EmpID Address_2 EmpID Address_2
1 A 1 A
1 B 2 G
2 C 2 H
3 G 5 J

Q 2.a: What is the ouput of UNION operation between table 3 and table 4 (from the previous question)?
Q 2.b: What is the difference between 'union' and 'union all'?

Question 3: (7 min)

Consider the table (tablename: cardata) below:


Brand ID Vehicle IDService charge
B1 V1 28707
B1 V2 21801
B1 V3 24351
B2 V4 16506
B2 V5 7925
B3 V6 11577
B4 V7 19132
B5 V8 7688
B5 V9 26238

Q 3.a: Write a query to find the highest service charge in the entire table
Q 3.b: Write a query to find the average service cost of all vehicles at Brand ID level
Q 3.c: What is the difference between 'where' and 'having' key words?

Question 4: (5 min)
Consider the table column below:
Value Row_number
Rank Dense rank
12
12
23
23
23
29
31

Q 4.a: Assign Row number to the value column


Q 4.b: Assign Rank to the value column
Q 4.c: Assign Dense rank number to the value column

Question 5: (6 min)
Q 5.a: What function is used to find out difference between two dates?
Q 5.b: How to extract year, month and day details from a date column?
Q 5.c: How to extract first name from the 'Full name' column below?

Full name
Jolie Nichols
Madiha Armstrong
Christina Weber
Daisie Nieves
Basic Programming
1.       Separate the list a = [1,2,3,4,5,6,7,8] into [[1,2],
Checking [3,4],[5,6],[7,8]]
Logic and 5 minutes
Loops( for 2.       Create a list with random numbers and write
while) function to find any one of them- a. Largest number
b. Smallest numbers 5 minutes

DataFrame based questions - Data Wrangalling


With respect to global superstore data please refer below questions

by and 3. find out the the following at country and State leve
aggregate
function 5 minutes
2. Visualiz 4. Plot a bar chart to show how each consumer segments 5 minutes
3. Adding 5. Add new column - Profict status if Profit > 0 then Pos 5 Minutes

You might also like