AQLearn 1.1 / Welcome

Your First AQL Explore

Source lesson: AQLearn 1.1: Welcome. Tangible win: explain what first AQL query means, line by line.

Why this matters for your mission: presales and debugging both start with clear language: “this measure is being broken down by this dimension.” This lesson gives that first sentence.

Core idea

AQL is built for analytical questions. The opening AQLearn query asks: how many orders are in each status?

explore {
  measures {
    count_of_orders: orders | count(orders.id),
  }
  dimensions {
    order_status: orders.status,
  }
}

explore

Report-shaped AQL. It contains dimensions, measures, and optional filters.

measures

Aggregated calculations. Here, orders | count(orders.id) counts order rows.

dimensions

Breakdowns. Here, orders.status splits the count by order status.

Line-by-line reading

  1. explore { ... }: run a report-style query.
  2. measures { ... }: choose numbers to calculate.
  3. count_of_orders:: name the output column.
  4. orders | count(orders.id): start from orders, count order IDs.
  5. dimensions { ... }: choose how to break the measure down.
  6. order_status: orders.status: group result by status.
Customer-safe explanation: “This query counts orders, then breaks that count down by order status.”

Retrieval practice

1. Which block breaks a number down by category?
2. In orders | count(orders.id), what is the aggregate function?
3. Best plain-English reading of the query?

Do in AQLearn

  1. Open AQLearn Welcome.
  2. Switch Data Models to orders.
  3. Run the provided query.
  4. Say out loud: “count orders by status.”

Next local lesson

Next: aggregate functions, count, max, min, avg, using AQLearn 1.2.