select `year`,`month`,IFNULL(sum(`total_amount`),0) as `totalAmount`,IFNULL(sum(`total_quantity`),0) as `totalQuantity`,IFNULL(sum(`toal_common_ammount`),0) as `toalCommonAmmount`,
IFNULL(sum(`total_common_quantity`),0) as `totalCommonQuantity`,IFNULL(sum(`total_gold_amount`),0) as `totalGoldAmount`,IFNULL(sum(`total_gold_quantity`),0),
IFNULL(sum(`total_common_quantity`),0) as `totalCommonQuantity`,IFNULL(sum(`total_gold_amount`),0) as `totalGoldAmount`,IFNULL(sum(`total_gold_quantity`),0) as `totalGoldQuantity`,
IFNULL(sum(`total_diamond_ammount`),0) as `totalDiamondAmmount`,IFNULL(sum(`total_diamond_quantity`),0) as `totalDiamondQuantity` from `order_member_received_statistics` where 1=1
select `year`,`week_of_year`,IFNULL(sum(`total_amount`),0) as `totalAmount`,IFNULL(sum(`total_quantity`),0) as `totalQuantity`,IFNULL(sum(`toal_common_ammount`),0) as `toalCommonAmmount`
,IFNULL(sum(`total_common_quantity`),0) as `totalCommonQuantity`,IFNULL(sum(`total_gold_amount`),0) as `totalGoldAmount`,IFNULL(sum(`total_gold_quantity`),0),
,IFNULL(sum(`total_common_quantity`),0) as `totalCommonQuantity`,IFNULL(sum(`total_gold_amount`),0) as `totalGoldAmount`,IFNULL(sum(`total_gold_quantity`),0) as `totalGoldQuantity`,
IFNULL(sum(`total_diamond_ammount`),0) as `totalDiamondAmmount`,IFNULL(sum(`total_diamond_quantity`),0) as `totalDiamondQuantity` from `order_member_received_statistics` where 1=1