Sometimes we need to round some numbers, particularly when working with the results of an aggregation. We can use the ROUND() function to get the job done.
The SQL ROUND() function allows you to specify both the value you wish to round and the precision to which you wish to round it:
ROUND(value, precision)
If no precision is given, SQL will round the value to the nearest whole value:
SELECT ROUND(AVG(song_length), 1)
FROM songs
This query returns the average song_length from the songs table, rounded to a single decimal point.
round_age