zoukankan      html  css  js  c++  java
  • 有赞数据线上会员购买量

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

    #今日门店销售额
    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;
  • 相关阅读:
    解决Tomcat无法shutdown进程
    ConcurrentHashMap Put()操作示例代码
    Spring Data JPA
    JAVA CAS原理
    多线程
    多线程
    java 虚拟机--新生代与老年代GC
    TCP协议中的三次握手和四次挥手
    java中volatile关键字
    Java多线程
  • 原文地址:https://www.cnblogs.com/sakura3/p/10498340.html
Copyright © 2011-2022 走看看