Interview Query

Apple Data Analyst | October 2020

Company: Apple

Position: Data Analyst

Location: nan

Level: nan

Outcome: NA

How was the interview process? What was it like?

Show songId that exist at both tables, only x table, and only y table.

What technical questions were asked?


What was one of your solutions?

with subquery1 as (
    select userId, min(playDate) min_playDate, songId
    from play_tb
    group by userId, songId 
select a.userId, a.min_playDate, a.songId, a.songOrder
from (
    select userId, min_playDate, songId, row_number() over(partition by userId order by min_playDate) songOrder
    from subquery1
) a
where a.songOrder = 3


Sort By: Default

Edit Post

Tag your post (e.g. "Amazon", "Data Scientist" ...)