摘要:
有clients和lead_sources俩表。mysql数据库。lead_sources表结构类似:clients表中的lead_source_id是外键。现在要统计某时间段内client内每种lead_source所占百分比select a.L_name, ROUND((a.L_sub_count*1.0/b.total_count*100),1) as perTotal,a.L_sub_count,b.total_countfrom(SELECT LeadSource.name as L_name, count(*) as L_sub_countFROM clients as Clien 阅读全文
posted @ 2013-12-23 21:38
飞凡123
阅读(5991)
评论(0)
推荐(0)

浙公网安备 33010602011771号