01.06.2015, 10:57
This is my query:
^ This gets the number of rows, Admins & VIPs.
I want to merge this query with the query above
^ This gets the number of rows
I know there's a way, but I just can't figure out.
I want the result to be like this:
---
Accounts Admins VIPs Bans
x_________x_______x____x
---
Код:
SELECT Count(*) AS Accounts, SUM(CASE WHEN Admin > 0 THEN 1 ELSE 0 END) AS Admins, SUM(CASE WHEN VIP = 1 THEN 1 ELSE 0 END) AS VIPs FROM Accounts
I want to merge this query with the query above
Код:
SELECT COUNT(*) As Bans FROM Bans
I know there's a way, but I just can't figure out.
I want the result to be like this:
---
Accounts Admins VIPs Bans
x_________x_______x____x
---