Q&A about the site for developers and end users of the Sitecore CMS and multichannel marketing software
select CONCAT(bin_floor, ' to ', bin_ceiling) as bin, count(*) as cnt from ( select FLOOR(Views / 10.00) * 10 as bin_floor, FLOOR(Views / 10.00) * 10 + 10 as bin_ceiling from Users ) a group by CONCAT(bin_floor, ' to ', bin_ceiling), bin_floor order by bin_floor;