Selecting/casting output as integer in SQL April 3, 2024 by Tarik SELECT CAST(sum(number)/count(number) as UNSIGNED) as average, date FROM stats WHERE * GROUP BY date