Ebay Interview Question
AnalystsCountry: United States
Interview Type: Phone Interview
-- To find average price per zipcode
select
t2.zipcode
, avg(t1.price) as avgprice
from table1 t1 join table2 t2
on t1.transactionid = t2.transactionid
group by t2.zipcode
-- To find zipcode having avg price > $5
select
t2.zipcode
, avg(t1.price) as avgprice
from table1 t1 join table2 t2
on t1.transactionid = t2.transactionid
group by t2.zipcode
having avg(t1.price) > 5
- vijay.edella August 26, 2014