Unable To Fulfill – Aquariums | Forum Promotion

rejected.png


Sorry, but your request has been rejected because you have not made 15 posts in the past seven days, as of this request you only have seven posts in the past seven days. Once the problem is resolved, you may request again. If you have any further questions, you may ask here.

Please be sure to read our Package Request Guidelines, found here.
‚Äč

mysql – How to retrieve the sum of 3 sub-count aquariums and group them using an attribute

I have 3 questions like this:
For the date 2019-12-02, I calculate 3 types of values. The total value for 2019-12-02 must be the sum of these 3 queries.

Q1 =>

 SELECT count(*) FROM XAXBXC_charge_info_ABC_tbl WHERE date = '2019-12-02' AND cg_response_code = 0 

Q2 =>

SELECT count(*) FROM XAXBXC_charge_info_ABC_tbl WHERE date = '2019-12-02' AND topup_id = 10 AND topup_cg_response_code LIKE '0' 

Q3 = ->

 SELECT count(*) FROM XAXBXC_charge_info_ABC_tbl WHERE date = '2019-12-02' AND topup_id = 11 AND topup_cg_response_code LIKE '0'

I try to calculate and display the sum as follows:

Date | total

2019-12-02 | 234

e.g: –
For a given date, the sum should be equal to the sum of Q1 + Q2 + Q3 and must be grouped by the date column.
Can somebody help me with it? I'm stuck here for a long time. Thank you!