首页 > 其他 > 详细

有赞数据线上会员购买量

时间:2019-03-08 21:31:29      阅读:183      评论:0      收藏:0      [点我收藏+]

 

 

 

以前未免也太蠢了.不会解决问题的方式.未免太蠢了

#今日门店销售额
SELECT
    ROUND(sum(real_pay) / 10000, 2) AS `门店销售额`
FROM
    arm_changsha.goods_sales
WHERE
    create_date >= 2019-01-01 00:00:00
AND create_date <= 2019-01-01 23:59:59
AND salesdepart_id = 1025;

#今日线上销售额
SELECT
    SUM(pay_amount) AS 订单金额
FROM
    mabao51_dev.mall_trade
WHERE
    order_time >= 2019-01-01 00:00:00
AND order_time <= 2019-01-01 23:59:59
AND is_deleted != 1
AND store_id_arm = 1008 ;

#会员总数
SELECT
    COUNT(DISTINCT memberId) AS 会员总数
FROM
    mabao51_dev.member_org_lnk
WHERE
    organizationId = 1025;

#本月有购会员
SELECT
    COUNT(DISTINCT member_id) AS 有购会员
FROM
    arm_changsha.goods_sales
WHERE
    create_date >= 2019-01-01 00:00:00
AND create_date <= 2019-01-31 23:59:59
AND salesdepart_id = 1025;

#商城订单-待核销
SELECT
    COUNT(1) AS 待核销订单
FROM
    mabao51_dev.mall_trade
WHERE
    is_deleted != 1
AND store_id_arm = 1025
GROUP BY
    trade_status;

 

有赞数据线上会员购买量

原文:https://www.cnblogs.com/sakura3/p/10498340.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!