Independent Company Challenges

Meta-style SQL challenges

Independent Meta-style social-product, engagement, content, community, messaging, and advertising SQL practice.

These independent exercises use Meta-relevant business domains; they are not claimed to be questions used by Meta, and this site is not affiliated with the company.

Exercises
23
Difficulty
Beginner to Hard

What this collection tests

Skills and query patterns

Social-product analytics, graph relationships, engagement, content performance, messaging, and ads

Curated exercises

Choose a challenge

Work in the live editor where supported. Advanced guided labs state their engine boundary before you open the workspace.

  1. Challenge 1Beginner

    Active Users List

    Which users currently have an active account?

    • Date analysis
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  2. Challenge 2Easy

    Post Count Per User

    How many posts has each user created, and who posts the most?

    • Joins
    • Aggregation
    • HAVING

    SQLite live

    Open challenge
  3. Challenge 3Easy

    Most Liked Posts

    Which posts have received the most likes — show the top posts with creator and content preview?

    • Joins
    • String functions
    • Sorting

    SQLite live

    Open challenge
  4. Challenge 4Easy

    Accepted Friend Requests

    Show all confirmed friendships with both users' full names and when the friendship was accepted.

    • Joins
    • Date analysis
    • Filtering

    SQLite live

    Open challenge
  5. Challenge 5Easy

    Public Groups

    Which groups are open to the public, and how many members do they have?

    • Joins
    • Date analysis
    • Filtering

    SQLite live

    Open challenge
  6. Challenge 6Beginner

    Verified Pages

    Which pages have the verified badge on Meta, and who created them?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  7. Challenge 7Medium

    User Engagement Analysis

    For every user, how many posts, comments, and likes have they made — and what is their combined total engagement score?

    • Joins
    • Aggregation
    • Sorting

    SQLite live

    Open challenge
  8. Challenge 8Medium

    Power Users (Above Average Posters)

    Which users post more than the platform average, and by how much do they exceed it?

    • Joins
    • Subqueries
    • Aggregation

    SQLite live

    Open challenge
  9. Challenge 9Hard

    Average Time Between Posts

    For users who have posted at least twice, what is their average gap in days between consecutive posts?

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  10. Challenge 10Medium

    Group Activity Ranking

    Rank all groups by the total number of posts created by their members.

    • Window functions
    • Joins
    • Aggregation

    SQLite live

    Open challenge
  11. Challenge 11Medium

    Ad Campaign Performance

    For each ad campaign with at least 1,000 impressions, what is the click-through rate (CTR) and the conversion rate from clicks?

    • Joins
    • Numeric functions
    • NULL handling

    SQLite live

    Open challenge
  12. Challenge 12Hard

    Friendship Network Analysis

    For each user with at least one accepted friend, show their friend count, their largest mutual-friend count with any direct friend, and their network rank.

    • Window functions
    • Joins
    • Subqueries

    SQLite live

    Open challenge
  13. Challenge 13Hard

    Content Virality Score

    Calculate a virality score for each post — combining likes, comments, and shares with different weights — and rank posts by virality.

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  14. Challenge 14Hard

    User Influence Score Dashboard

    For each active user, calculate a composite influence score based on posts, average engagement, friend network, and peak engagement — then rank them.

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  15. Challenge 15Hard

    Cross-Platform Engagement Correlation

    For each active user, count posts, comments, likes, sent messages, and stories; classify their primary engagement type; and rank their weighted total activity.

    • Window functions
    • Joins
    • Subqueries

    SQLite live

    Open challenge
  16. Challenge 16Beginner

    Inactive Accounts

    Which user accounts are currently inactive?

    • Filtering
    • Sorting

    SQLite live

    Open challenge
  17. Challenge 17Beginner

    Pending Friend Requests

    Which friend requests are still waiting to be accepted?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  18. Challenge 18Easy

    Users Who Have Never Posted

    Which registered users have never created a single post?

    • Joins
    • NULL handling
    • Filtering

    SQLite live

    Open challenge
  19. Challenge 19Easy

    Unread Direct Messages

    Which users have unread direct messages, and how many?

    • Joins
    • Aggregation
    • NULL handling

    SQLite live

    Open challenge
  20. Challenge 20Medium

    Top Poster Per Country

    In each country, which user has created the most posts?

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  21. Challenge 21Medium

    Page Follower Share

    For each page, how many tracked followers do they have in the dataset, and what percentage of all tracked follows does that represent?

    • Joins
    • Subqueries
    • Aggregation

    SQLite live

    Open challenge
  22. Challenge 22Hard

    Story Views Leaderboard

    Rank all users who have posted at least one story by their total story views, and show each story's individual view count.

    • Window functions
    • Joins
    • Subqueries

    SQLite live

    Open challenge
  23. Challenge 23Hard

    Friend Suggestions (Friends of Friends)

    For each user, which users do they share a mutual friend with but are not yet directly connected to?

    • CTEs
    • Joins
    • Subqueries

    SQLite live

    Open challenge
01

Attempt

Write a query or design from the brief before opening any hints.

02

Validate

Run it against the included dataset and inspect the output.

03

Explain

Compare the verified answer and explain each choice aloud.

Learn before practicing Meta

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Interview Practice

Return to the complete interview preparation experience.