skip to today's puzzle

AVG gives the average of a column

Starting table: menu_items

Starting menu_items data before the example query
nameprice
Espresso3.5
Latte4.75
Cold brew4.25
Cookie4.5

AVG adds up a column of numbers and divides by how many values there were — the average, worked out for you. It also turns many rows into one answer, so the result is a single number. Pair it with AS to give that number a clear heading.

A tiny example

In plain English: Tell me the average price of all items on the menu.

SELECT AVG(price) AS average_price
FROM menu_items;

Query result

average_price
4.25

The four menu prices total 17.00; 17.00 ÷ 4 gives an average of 4.25.

Related SQL lessons

Practice AVG step by step

The Foundations Track has beginner puzzles built around this idea. Tap tiles, see real results. No terminal, no setup.

practice this in the course

Ready for a break?

A fresh, bite-sized SQL puzzle waits every morning. Tap tiles, see real results. No terminal, no setup, no timers.

Try today's free SQL puzzle