提交 a955ab06 authored 作者: chaoyanjun's avatar chaoyanjun

总资源转化次数转化率

上级 aec29fd4
......@@ -103,7 +103,10 @@ public interface GoodsLogMapper extends BaseMapper<GoodsLog> {
List<GoodsLog> getHot();
@Select("<script>"
+ " select a.id, a.name, sum(a.clicknum) clicknum, sum(a.collectnum) collectnum, sum(a.tradenum) tradenum, sum(a.tradeamount) tradeamount, sum(a.downloadnum) "
+ " select a.id, a.name, sum(a.clicknum) clicknum, sum(a.collectnum) collectnum, sum(a.tradenum) tradenum, "
// 交易次数除以总订单数
+ " CONCAT(ROUND(tradenum/(SELECT COUNT(*) FROM sta_order)*100,2),'','%') percent, "
+ " sum(a.tradeamount) tradeamount, sum(a.downloadnum) "
+ " downloadnum, s.id type, a.typezh, a.siteid, date_format(a.createtime, '') createtime from sta_goods_log a, (select count(c.id) id,c.typezh from (select z.id, "
+ " z.typezh, z.name from sta_goods_log z group by z.name) c group by c.typezh ) s where a.typezh = s.typezh group by a.typezh order by sum(a.clicknum) desc "
+ "</script>")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论