Back to Practice Hub

intermediate SQL Challenges

Solve interactive scenarios to prove your capability in intermediate-level queries using our live sandbox.

COMPLETED0 / 125
intermediateGROUP BY 8m

Total Sales per Category

Write a query to find the total sales revenue generated (sum of `total_amount`) for each product category. Show the `category` and the sum aliased as `total_revenue`, sorted from highest to lowest revenue.

GROUP BYSUMJOINORDER BY
Start Exercise
intermediateHAVING 8m

High-Spending Customers

Identify all customers who have spent a total of more than $500 across all their orders. Retrieve the customer's `name` and their `total_spent`. Sort the results by `total_spent` descending.

GROUP BYHAVINGSUMJOIN
Start Exercise
intermediateJoins 7m

Retrieve Orders with Customer Details

Generate a list of all orders showing the `order_id` (alias `orders.id`), `order_date`, customer `name`, product `name`, and order `quantity`. Sort chronologically by `order_date`.

INNER JOINMulti-table Joins
Start Exercise
intermediateJoins 8m

Products Never Ordered

Identify all products in the database that have never been ordered. Retrieve their `name`, `category`, and `price`.

LEFT JOINAnti-JoinIS NULL
Start Exercise
intermediateSubqueries 7m

Products Priced Above Average

Retrieve the `name`, `category`, and `price` of all products that cost more than the average price of all products in the database. Sort by price ascending.

SubquerySELECT in WHEREAVG
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 1)

Identify all 'Shipped' orders that have a total amount greater than $150.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 5)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 9)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 13)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 17)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 21)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 25)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 29)

Identify all 'Shipped' orders that have a total amount greater than $550.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 33)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 37)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 41)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 45)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 49)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 53)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 57)

Identify all 'Shipped' orders that have a total amount greater than $450.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 61)

List all product categories that have more than 2 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 65)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 69)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 73)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 77)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 81)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 85)

Identify all 'Shipped' orders that have a total amount greater than $350.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 89)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 93)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 97)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 101)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 105)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 109)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 113)

Identify all 'Shipped' orders that have a total amount greater than $250.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 117)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 121)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 125)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 129)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 133)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 137)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 141)

Identify all 'Shipped' orders that have a total amount greater than $150.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 145)

List all product categories that have more than 2 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 149)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 153)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 157)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 161)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 165)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 169)

Identify all 'Shipped' orders that have a total amount greater than $550.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 173)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 177)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 181)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 185)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 189)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 193)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 197)

Identify all 'Shipped' orders that have a total amount greater than $450.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 201)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 205)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 209)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 213)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 217)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 221)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 225)

Identify all 'Shipped' orders that have a total amount greater than $350.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 229)

List all product categories that have more than 2 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 233)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 237)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 241)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 245)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 249)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 253)

Identify all 'Shipped' orders that have a total amount greater than $250.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 257)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 261)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 265)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 269)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 273)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 277)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 281)

Identify all 'Shipped' orders that have a total amount greater than $150.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 285)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 289)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 293)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 297)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 301)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 305)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 309)

Identify all 'Shipped' orders that have a total amount greater than $550.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 313)

List all product categories that have more than 2 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 317)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 321)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 325)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 329)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 333)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 337)

Identify all 'Shipped' orders that have a total amount greater than $450.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 341)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 345)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 349)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 353)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 357)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 361)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 365)

Identify all 'Shipped' orders that have a total amount greater than $350.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 369)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 373)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 377)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 381)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 385)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 389)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 393)

Identify all 'Shipped' orders that have a total amount greater than $250.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 397)

List all product categories that have more than 2 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 401)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 405)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 409)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 413)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 417)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 421)

Identify all 'Shipped' orders that have a total amount greater than $150.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 425)

List all product categories that have more than 3 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 429)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 433)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 437)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 441)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 445)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 449)

Identify all 'Shipped' orders that have a total amount greater than $550.

WHEREANDNumeric Filter
Start Exercise
intermediateHAVING 7m

Categories with Minimum Product Count (Batch 453)

List all product categories that have more than 1 distinct products in stock. Show the category and product count aliased as `product_count`.

GROUP BYHAVINGCOUNT
Start Exercise
intermediateWindow Functions 10m

Order Sequence Number per Customer (Run 457)

Assign a sequential row number to each customer's orders, ordered by their order date. Display customer_id, order_date, total_amount, and the sequence number aliased as `order_sequence`.

ROW_NUMBEROVERPARTITION BY
Start Exercise
intermediateReal Business Cases 10m

Average Basket Size Growth (Run 461)

Calculate the overall average order total_amount (basket size) and the total number of completed orders.

AVGCOUNTWHERE
Start Exercise
intermediateAggregation 5m

Total Stock Count per Category (Scenario 465)

Calculate the total stock quantity and average price of all products in the 'Accessories' category.

SUMAVGWHERE
Start Exercise
intermediateSubqueries 8m

Products Above Category Average (Set 469)

Find all products that cost more than the average price of products in the 'Home' category.

SubqueryAVGWHERE
Start Exercise
intermediateString Functions 5m

Customer Email Domain Extraction (Type 473)

Identify all customers who use a Gmail address. Return their name and email, filtering where the email ends with '@example.com'.

LIKEString Matching
Start Exercise
intermediateFiltering 6m

Filter Orders by Status and Value (Batch 477)

Identify all 'Shipped' orders that have a total amount greater than $450.

WHEREANDNumeric Filter
Start Exercise