Interview Query

Facebook Data Scientist | November 2020

Company: Facebook

Position: Data Scientist

Location: nan

Level: nan

Outcome: NA

How was the interview process? What was it like?

Product Based Questions

What technical questions were asked?

nan

What was one of your solutions?

WITH first_time AS (
SELECT caller_id, MIN(date) AS date_used
FROM users
GROUP BY caller_id
SELECT users.caller_id, first_time.date_used AS first_time_used, users.date AS usage_date, users.date - first_time.date_used AS days_between, DATEDIFF('day', users.date, first_time.date_used) AS days_between
FROM first_time
LEFT JOIN users
ON first_time.caller_id = users.caller_id
AND first_time.date_used < users.date
WHERE first_time.date_used = '2019-03-01' AND days_between = X

0 Comments

Sort By: Default

Edit Post

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

Preview