Meta Interview Questions
Metric definition : count of distinct calendar days a user logged in within a given period. Schema : Query — unique login days per user in last 30 days...
Design a dashboard metric: unique login counts per user.
Metric definition : count of distinct calendar days a user logged in within a given period. Schema : Query — unique login days per user in last 30 days : Dashboard aggregation : store daily counts in a pre aggregated table refreshed nightly. Power a p50/p90 distribution view to understand engagement distribution across the user base.
Propose a KPI to analyze feature impact in a News Feed.
Primary KPI : Feed Engagement Rate = (likes + comments + shares + clicks) / total feed impressions. Supporting KPIs : Scroll depth : median % of feed viewed per session Return rate : % of users who return within 24h after feed interaction Time on feed : median session duration on feed surface Negative signals : hide/unfollow rate (quality guardrail) For a specific feature (e.g., new story format): Compare engagement rate for users shown the feature vs control group Track counter metrics : does t
Calculate video popularity on Facebook—formulation and query.
Popularity score formula : Normalize by content age: score / LOG(1 + hours since upload) (Hacker News style decay). Query :
Design a product experiment to measure engagement on a feature.
Framework : randomized controlled experiment (A/B test). Setup : 1. Hypothesis : the new feature increases engagement rate by ≥2% 2. Randomization unit : user id (consistent experience across sessions) 3. Assignment : hash(user id + experiment id) % 100 — deterministic, no DB lookup 4. Traffic split : 50/50 control vs treatment 5. Duration : minimum 2 weeks (capture weekly seasonality) Metrics : Primary : feature engagement rate Guardrails : overall session time, ad revenue, unfollow rate Analys
Design a data model/schema for a ride-sharing service.
Core tables : For analytics : Partition fact trips by date Z order on driver key , rider key for per entity queries Add fact trip events for granular lifecycle tracking (request → accept → pickup → dropoff) Metrics unlocked : average wait time, driver utilization, surge price impact on demand.
Create DDL from an ERD containing many-to-many relationships.
ERD : Students ↔ Courses (many to many — one student takes many courses, one course has many students) DDL : The bridge table ( enrollments ) holds the foreign keys from both sides plus any relationship specific attributes (grade, enrollment date).
Model a system for global weather tracking data.
Fact table (one row per reading): Dimension tables : Storage : partition by year/month . For real time ingestion: IoT sensors → Kafka → Spark Streaming → Delta Lake. For historical analysis: batch load from NOAA/ECMWF APIs daily via Airflow.
Write SQL to find the second-highest salary in a table.
Method 2 with DENSE RANK is the most interview friendly — it handles ties and extends easily to "Nth highest" by changing the rnk = N filter.