Independent Company Challenges

Apple-style SQL challenges

Independent Apple-style product, retail, services, support, workforce, and device-usage SQL practice.

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

Exercises
20
Difficulty
Beginner to Hard

What this collection tests

Skills and query patterns

Product analytics, retail locations, subscriptions, customer support, workforce, apps, and devices

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

    iPhone Product Catalog

    Which iPhone models are currently for sale, and what are their storage, colour, and price options?

    • Filtering
    • Sorting

    SQLite live

    Open challenge
  2. Challenge 2Beginner

    Active Apple Music Subscribers

    Which customers currently hold an active Apple Music subscription, and what plan are they on?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  3. Challenge 3Beginner

    Flagship Store Locations

    Which Apple stores are Flagship locations, and how many employees work at each?

    • Filtering
    • Sorting

    SQLite live

    Open challenge
  4. Challenge 4Beginner

    Orders Using Apple Pay

    Which orders were paid using Apple Pay, and who made them?

    • Joins
    • Date analysis
    • Filtering

    SQLite live

    Open challenge
  5. Challenge 5Easy

    Top Rated Apps

    Which apps on the App Store have the highest ratings, and how many downloads have they reached?

    • Filtering
    • Sorting
    • Top-N

    SQLite live

    Open challenge
  6. Challenge 6Easy

    Genius Bar Appointments Today

    Which Genius Bar appointments are scheduled for January 11, 2024 — who are the customers, which stores, and what are their issues?

    • Joins
    • Filtering
    • Sorting

    SQLite live

    Open challenge
  7. Challenge 7Medium

    Product Category Revenue Analysis

    For each product category, what is the total revenue, number of orders, and average order value? Only show categories generating at least $200 in revenue.

    • Joins
    • Subqueries
    • Aggregation

    SQLite live

    Open challenge
  8. Challenge 8Medium

    Customer Purchase Frequency Analysis

    For each customer who has placed at least one order, show their total orders, total spent, average order value, and rank them by total spend.

    • Window functions
    • Joins
    • Aggregation

    SQLite live

    Open challenge
  9. Challenge 9Medium

    App Category Performance Analysis

    For each App Store category with at least 5 million total downloads, show total downloads, average rating, app count, and rank by download volume.

    • Window functions
    • Aggregation
    • HAVING

    SQLite live

    Open challenge
  10. Challenge 10Medium

    Store Performance Comparison

    For each retail order location with at least one delivered order, show total revenue, average transaction value, order count, and its rank among retail locations.

    • Window functions
    • Joins
    • Aggregation

    SQLite live

    Open challenge
  11. Challenge 11Beginner

    Discontinued Products

    Which Apple products have been discontinued and are no longer for sale?

    • Filtering
    • Sorting

    SQLite live

    Open challenge
  12. Challenge 12Easy

    Open Support Tickets

    Which support tickets are still open or in progress — who are the customers, what products, and how urgent?

    • Joins
    • CASE expressions
    • Date analysis

    SQLite live

    Open challenge
  13. Challenge 13Easy

    iCloud Storage Plan Segments

    How many customers fall into each iCloud storage tier, and what is the average storage in each group?

    • Aggregation
    • CASE expressions
    • Numeric functions

    SQLite live

    Open challenge
  14. Challenge 14Easy

    Average Screen Time by Device

    What is the average daily screen time and app opens for each Apple device type?

    • Aggregation
    • Numeric functions
    • Sorting

    SQLite live

    Open challenge
  15. Challenge 15Medium

    Department Budget vs Salary Cost

    For each department, how does the total salary cost compare to the budget, and what is the average salary?

    • Joins
    • Aggregation
    • Numeric functions

    SQLite live

    Open challenge
  16. Challenge 16Medium

    App Store Download Revenue by Category

    For each app category downloaded by our customers, how many were free vs paid, and what is the total revenue generated?

    • Aggregation
    • CASE expressions
    • Numeric functions

    SQLite live

    Open challenge
  17. Challenge 17Hard

    Employees Earning Above Department Average

    Which employees earn more than their department average salary, and by how much?

    • CTEs
    • Joins
    • Subqueries

    SQLite live

    Open challenge
  18. Challenge 18Hard

    Genius Bar Appointment Summary by Store

    For each Apple store, how many Genius Bar appointments have been held in total, and how many were completed vs scheduled?

    • Joins
    • Aggregation
    • CASE expressions

    SQLite live

    Open challenge
  19. Challenge 19Hard

    Top-Spending Customer per Country

    In each country, which customer has spent the most on Apple products, and how much have they spent?

    • CTEs
    • Window functions
    • Joins

    SQLite live

    Open challenge
  20. Challenge 20Hard

    Apple Music Cancellation Rate by Plan

    For each Apple Music plan type, what is the total number of subscribers, how many have cancelled, and what is the cancellation rate?

    • Aggregation
    • CASE expressions
    • Numeric functions

    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 Apple

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Interview Practice

Return to the complete interview preparation experience.