0

Can you help me?i wanna get more information and changes my Query

select * from(
        select count(*) as 'To_Recharge' from table_in where created_on like '%2020-02%') as A
        cross join(
        select count(*) as 'Recharge_u' from table_in where created_on like '%2020-02%) as B
        cross join(
        select count(*) as 'Recharge_S' table_in where created_on like '%2020-02% and c_by=1 )as C
        cross join(
        select count(*) as 'O_recharge' table_in where created_on like '%2020-02%)as d);

The result Query is :

To_Recharge | Recharge_u | Recharge_S | O_recharge


  500      |    250   |   250     | 0

Can I change to(transpose):

----------------------
| To_Recharge | 500  |
----------------------
| Recharge_U | 250   |
----------------------
| Recharge_S | 250   |
----------------------
| O_recharge | 0     |
----------------------

**Thanks too much for your help and efforts. **

CXR
  • 33
  • 4
  • I don't believe that this query would produce anything other than a syntax error. But I don't answer questions with 'wanna' in them, so either way, you're unlikely to get more from me. – Strawberry Mar 06 '21 at 09:08
  • Use unions instead of joins. – Shadow Mar 06 '21 at 09:12

0 Answers0