SELECT TOP 1 "row" AS Label,
(SELECT SUM(commission) FROM [transactions] WHERE type=0 OR type=2) AS SumCommission0or2,
(SELECT count(*) FROM users) AS UserCount,
(SELECT count(*) FROM transactions WHERE type = 0) AS TxnCount,
(SELECT SUM(commission) FROM [transactions] WHERE type=1) AS SumCommission1
FROM [transactions]
|