dev.sql 340 B

1234567
  1. -- 数据分析sql
  2. -- 节点售卖数量
  3. select count(1),sum(quantity),sum(amount1),sum(amount2) from user_product;
  4. select count(1),sum(amount1),sum(amount2) from user_product where status = 0;
  5. select source,count(1),sum(quantity),sum(amount1),sum(amount2) from user_product where status = 0 group by source;
  6. --todo: 主业务数据分析