I have this SQL:
SELECT COUNT(*) as "With Gold" FROM user_accounts_gold WHERE level = 6
UNION
SELECT COUNT(*) as "No Gold" FROM user_accounts_bronze WHERE level = 6
At the moment this outputs:
| With Gold |
-------------
| 17734 |
| 2388 |
Is there a way to get this to output like so:
| With Gold | No Gold |
----------------------
| 17734 | 2388 |
Thanks
Do a CROSS JOIN
instead:
select * from
(SELECT COUNT(*) as "With Gold" FROM user_accounts_gold WHERE level = 6) ug
CROSS JOIN
(SELECT COUNT(*) as "No Gold" FROM user_accounts_bronze WHERE level = 6) ub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With