Q2 sales and margin check

EasyWalmartrevenuegross marginjoinsshare of total· 20 XP (10 per step)

Mock interview. You're interviewing for a data analyst job on a retail merchandising team. The interviewer shares sales (one row per line on a receipt or online order) and products. "Let's start with the basics of last quarter."

  • Revenue of a line is units * unit_price (the price actually paid, after any promotion).
  • Gross profit of a line is units * (unit_price - unit_cost), with unit_cost from products.
  • Gross margin is gross profit as a percentage of revenue.

Step 1: The headline numbers

"Give me Q2 2026 (April to June) in one row: revenue, units sold, gross profit and gross margin."

Expected output

  • One row; gross_margin as a percentage rounded to 1 decimal

Example of the shape (made-up values):

revenue units gross_profit gross_margin
60000.00 7000 21000.00 35.0

Hints, the later steps and the answer come with Pro.

Step 1 of 2

Write your query here. Ctrl + Enter submits.