mysql sum if 사용
아이템 구매 일자별로 통계 확인 123456789SELECT 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..
2018. 10. 2.