I can display the total quantity of each group based on the Creation Time, but I cannot display the unused quantity and used quantity at the same time. What should I do? This is what I want. Thank you {code ...}
I can display the total quantity of each group based on the Creation Time, but I cannot display the unused quantity and used quantity at the same time.
What should I do?
This is what I want. Thank you.
Coupon name type denomination not used 5000-100 1 100 2 11000 2 1000 1 110 3 10 1 0
Reply content:
I can display the total quantity of each group based on the Creation Time, but I cannot display the unused quantity and used quantity at the same time.
What should I do?
This is what I want. Thank you.
Coupon name type denomination not used 5000-100 1 100 2 11000 2 1000 1 110 3 10 1 0
Select name 'coupon name', type 'type', value 'denomination ', sum (if (status =, 0) 'unused ', sum (if (status =, 0) 'uses 'from table name group by name order by type;