0
← Exercises/
Fundamentals•1 of 12
PrevNext
FundamentalsBeginner

High-Value Active SaaS Subscriptions

Scenario

You are the lead product data analyst at CloudScale, an enterprise cloud observability platform. The sales team wants an urgent list of enterprise customers currently on active plans paying an Monthly Recurring Revenue (MRR) of $1,500 or more, so they can offer an annual contract upgrade.

Task
Write a query to retrieve all active enterprise subscriptions paying at least **$1,500** in MRR. Return the following columns: 1. `subscription_id` 2. `company_name` 3. `plan_tier` 4. `monthly_amount` (renamed as `mrr`) Order the results by `monthly_amount` in **descending** order. If two subscriptions have the same MRR, break ties by `company_name` ascending.
Expected Output Format

A table with subscription_id, company_name, plan_tier, and mrr sorted by highest MRR first.

Input Tables & Sample Data0 tables
Loading database schema...
Need a hint?
query.sql|Local Sandbox
Loading SQL editor...
Click "Run" or press ⌘ + Enter to execute your query

About the “High-Value Active SaaS Subscriptions” SQL Problem

Business Scenario

You are the lead product data analyst at CloudScale, an enterprise cloud observability platform. The sales team wants an urgent list of enterprise customers currently on active plans paying an Monthly Recurring Revenue (MRR) of $1,500 or more, so they can offer an annual contract upgrade.

Expected Output & Criteria

A table with subscription_id, company_name, plan_tier, and mrr sorted by highest MRR first.

Database Table Schema (PostgreSQL DDL)

PostgreSQL 16 WASM

This challenge executes directly against the following relational schema in your browser:

CREATE TABLE subscriptions (
        subscription_id VARCHAR(16) PRIMARY KEY,
        company_name VARCHAR(100) NOT NULL,
        plan_tier VARCHAR(50) NOT NULL,
        status VARCHAR(20) NOT NULL,
        monthly_amount NUMERIC(10, 2) NOT NULL,
        created_at DATE NOT NULL
      );

Target SQL Clauses & Operators

WHEREORDER BY

Want more Fundamentals practice?

Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.

View Fundamentals Track→