Mysql
 sql >> Database >  >> RDS >> Mysql

Selezione/casting dell'output come intero in SQL

SELECT 
  CAST(sum(number)/count(number) as UNSIGNED) as average, 
  date 
FROM stats 
WHERE * 
GROUP BY date