Search ⌘K
F
Facebook

Foundations Track · Easy · 15 min

9790 Number Of Processed Complaints

SELECT type, COUNT(complaint_id) FILTER(WHERE processed='TRUE') AS processed_complaints, COUNT(complaint_id) FILTER(WHERE processed='FALSE') AS non_processed...

Foundations Track
Easy
15 min
aggregation
filtering

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 type, COUNT(complaint_id) FILTER(WHERE processed='TRUE') AS processed_complaints, COUNT(complaint_id) FILTER(WHERE processed='FALSE') AS non_processed_complaints FROM facebook_complaints GROUP BY 1

facebook_complaints
complaint_id INT PRIMARY KEY
type VARCHAR(50
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.