Dunzo Interview round:-
Interview Type:- Basic SQL + Problem Solving
Interview Time :- 45 minutes (mostly) to 1 hour (rare)
I will keep the information too the point here so that its best suited for any reader. I got 3-4 questions from SQL and 2 Questions from Problem Solving.
SQL:-
Q1) It was an easy question to start with. Interviewer gave me two Tables (every table having only one column) like:
Table A:- Table B:-
id id
5 4
6 3
7 2
6 5
4 4
3 9
5 5
5 6
Our task is to write result of Inner Join,Left outer join and Right Outer join of above two tables.
This was easy one and I solved it easily.
Q2) For 2nd question he asked me that whether I am familiar with Case statements in SQl or not and then gave the following schema to me:-
user_id|Task_id|prod_name|Amount
My task is to write a query showing various types of Customer based on following requirements:
if Average of amount for a particular customer is between 0 to 100 then "Non Regular Customer"
if between 101 to 150 then "Regular Customer"
Ans) I thought for a second and then got the point. This was also an easy question. My answer was:-
SELECT user_id, Case
when Avg(amt) between (0,100) then "Non Regular Customer"
when Avg(amt) between (101,150) then "Regular Customer"
End
FROM Table_abc group by user_id
Q3) It was a little bit tricky question and was based upon Rank functions.
he provided me following schema:-
Sales
user_id|task_id|Amt|City|Category
My task was to identify top 3 categories based on no. of sales in each city.
Ans) I got the trick for this one as well and was able to solve it in next 5 minutes. My answer was:-
SELECT city, category
FROM(
SELECT city,category, rank() over (partition by city order by count(category) desc) rk
FROM Sales group by city,category) A
WHERE A.rk between (1,3)
by looking at this solution he asked me that whether count will work inside Rank or not . So I told him tat I have used it and it will work.
After this he was about to ask me one more question but said that its enough. and then switched to Problem Solving Round.
Problem Solving:-
Basic SQL round goes on for about 30 minutes.Once Basic SQL Round is done. Interviewer immediately switched to Problem solving round. And he asked me two questions in this round. The questions are as follows:-
Q1) Ants and Equilateral Triangle Problem:-
There are three Ants on each corner of an equilateral triangle. All of them can move in only two direction i.e. Clock wise or Anti Clock Wise direction. What is the probability of their collision.
Ans) You can find the answer on internet. Initially I was not able to answer this correct. Then interviewer asked my approach, my approach was correct. And after that he gave me enough hints to solve the question. And finally I was able to solve it.
Q2) 25 Horses 5 Tracks Problem:-
We have 25 horses and we have only 5 Tracks that means in a single race only 5 horses can run. How many minimum no. of races are required to get the top 3 fastest horses.?
Ans) I was not able to answer this question correctly. My approach was 90% correct. Again he gave me enough hints to solve the question but I was not able to get the correct answer.
Except the last question asked from me , I was able to solve all the questions correctly. So interviewer
sent me for the 2nd round.
Interview round 2:-
Hi can you mention about the round 2 well ?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteRound 2 questions please???
ReplyDeleteWrite about your round 2 experience also
ReplyDeletebro you ruined my interview.. we can't use count in the windows function...
ReplyDeleteBro please brush up your concepts, window functions are actually created for aggregated data and we can use Count() in Window Functions without any error. For more info please refer to this video of mine:-
Deletehttps://www.youtube.com/watch?v=uW5WyvvY6m0&t=1s