美文网首页
每月报表总结

每月报表总结

作者: Leo_23 | 来源:发表于2020-10-10 17:36 被阅读0次

    广告sql:

    SELECT sum(total) FROM report_payment WHERE description='Cost of Advertising' AND date_time>='2020-09-1 0:0:0' AND date_time<'2020-10-1 0:0:0';
    

    sku产品订单,销量

    SELECT count(1),sum(quantity) FROM report_payment WHERE sku='HSS8G-100LG8L-WW' AND date_time>='2020-09-1 0:0:0' AND date_time<'2020-10-1 0:0:0';
    

    sku产品销售额,总计

    SELECT sum(product_sales),sum(total) FROM report_payment WHERE sku='HSS8G-100LG8L-WW' AND date_time>='2020-09-1 0:0:0' AND date_time<'2020-10-1 0:0:0';
    

    sku退货数

    SELECT sum(quantity) FROM report_payment WHERE sku='HSS8G-100LG8L-WW' AND type='Refund' AND date_time>='2020-09-1 0:0:0' AND date_time<'2020-10-1 0:0:0';
    

    相关文章

      网友评论

          本文标题:每月报表总结

          本文链接:https://www.haomeiwen.com/subject/bvulpktx.html