Search ⌘K
F
Facebook

Foundations Track · Easy · 15 min

9789 Find The Total Number Of Approved Friendship Requests In January And February

SELECT COUNT(*) as n_approved FROM facebook_friendship_requests WHERE date_approved BETWEEN '2019-01-01' and '2019-02-28' -- NOTE: solved on first attempt

Foundations Track
Easy
15 min
aggregation
filtering
date functions

Company labels are directional practice context, not official interview guidance.

Timer 00:00
Back to practice

Objective

Practice aggregation through a Facebook-tagged business scenario.

Approach

Use this track to lock in clean query structure, basic filtering logic, and confidence with grouped output.

Company context

Company labels are directional practice context, not official interview guidance.

Prereq: query basics
Prereq: filtering

SELECT COUNT(*) as n_approved FROM facebook_friendship_requests WHERE date_approved BETWEEN '2019-01-01' and '2019-02-28' -- NOTE: solved on first attempt

facebook_friendship_requests
requester_id INT
requested_id INT
date_sent DATE
date_approved DATE
Editor
SQL workspace

Run queries against the protected question data, then submit once the result shape looks right.

Sign in to run SQL

Create a free account or sign in before running queries against protected question data.