아이템 구매 일자별로 통계 확인
1 2 3 4 5 6 7 8 9 | SELECT date(`create_time`) as `create_time` , sum(if(`reward_type` = 3, 1, 0)) as `heart_count` , sum(if(`reward_type` = 5 and `item_type` = 1, 1, 0)) as `straight_line` , sum(if(`reward_type` = 5 and `item_type` = 2, 1, 0)) as `range` , sum(if(`reward_type` = 5 and `item_type` = 3, 1, 0)) as `choice` , sum(if(`reward_type` = 5 and `item_type` = 4, 1, 0)) as `one_block` , sum(if(`reward_type` = 5 and `item_type` = 5, 1, 0)) as `shuffle` FROM `statistics_buy_shop` group by date(`create_time`); | cs |
'Mysql' 카테고리의 다른 글
기본 오류 처리 (0) | 2018.10.12 |
---|---|
저장소 특징 (0) | 2018.10.12 |
접속자 통계 (0) | 2018.09.13 |
mysql 게임 서버 MAU 처리 (0) | 2018.06.20 |
mysql 스케줄러 사용 (0) | 2018.06.20 |