Vous êtes sur la page 1sur 2

Ques: 1 table - which has latitude and longitude information for each pincode.

Assume
you have an in-built function to find the distance between two pairs of lat, long.
i.How will you get the distance between each pin code pair without repetition ie. AB
points should be there but not BA and likewise
Ans:. Not able to understand the question even after giving hints.

Ques: How will you remove duplicates from the query result?
Ans:

Ques: Taxi service db


Ques: what metrics would you want to track?
 Passenger name
 Driver name
 Rating
 time
 Amount
 Cab ID

Que: Schema for the taxi cab service

Ans: table names


Trips table:
Trip id, driver id, passenger id1(cannot be null),id2,id3,id4,from, to, rating,
amount, vehicle id
Driver Table
Driver id name mail id phone no address gender vehicle id
Passenger Table
Passenger id name mail id phone no address gender
Vehicle table
Vehicle no, chesis no, name company, insured on , insured till , buying date,
type(diesel/petrol) owner

Ques: How would you identify customers which should be given promotional offers?
Ans: aggregate the trips based on id those who are having less that 5 trips can be given

Que: Which customers availed your cab service in Feb but not in March
Ans: Wrote a wrong query and did mistakes with simple joins
Que: Can you do it in 3 steps?
Ans:
Que: How to do it without nested query?
Ans:
Ques: Find drivers which have total number of rides greater than the avg. rides/driver in
Feb?
Ans: Not bale to understand the problem. After hints wrote a wrong query

Ques: Which location ids have total rides taken less than average rides per location in
Feb?
Ans: Didn’t ask

Ownership, Past work, Project Mgmt, Culture Fit and Self awareness
Did not test for this competency
People Management and Org Building, Driving Culture
Did not test for this competency

Question 1: Three tables one fact, one dimension and one more table. Use of window
functions across various levels.

Question 2: Transpose table bringing one level from row to column

Question 3:Transpose table bringing one level from column to row

Detailed feedback: – Couldn’t write SQL queries completely. Basic understanding of


concepts of SQL were missing for example JOIN vs. Union. She couldn’t get the rough
syntax also most of the times. Did basic mistakes in simple left joins. She hasn’t had
any prior exposure to SQL which was reflecting.

Result: Reject

Select driver id, count(driver id) from trip


Group by driver id
Having count(driver id) > (select avg(trip id) from trip)

Count(trip id)/count(distinct driver id)

Vous aimerez peut-être aussi