MySQL 按照范围/等级 进行Group By

iam3y.com | 数据库相关 | 2014-05-30
我们要做一张报表表格,从mysql里取出数据,然后按等级分组,如何实现呢? MySQL 示例 SQL: SELECT ftime, sum(cost) as cost, count(advertiser_id) as aduser_num, sum(pv) as pv, sum(vc) as vc, CASE WHEN cost>100000 THEN '1' WHEN cost>50000 and cost<=100000 THEN '2' WHEN cost>10000 and cost<=50000 THEN '3... [阅读全文]
Ɣ回顶部