skip to today's puzzle
SQL Sip

ROUND tidies up a number

Averages often come back with a long tail of decimals. ROUND takes the number and how many decimal places you want, and gives back a neater version. It only changes what you see in the result — the numbers stored in the table stay exactly as they were.

A tiny example

In plain English: Tell me the average book price, rounded to two decimal places.

SELECT ROUND(AVG(price), 2) AS average_price
FROM books;

What comes back

average_price
12.75

The real average had a long tail of decimals; ROUND trimmed it to two.

Related SQL lessons

Ready for a break?

Take on today's cozy puzzle. A fresh, bite-sized query waits every morning — no timers, no pressure.

play today's sip