Hello,
I am trying to get the results similar to the below with this...
UserID | Exp1 | Exp2 | Exp3 | Exp4
-----------------------------------
123 | 1 | 9 | 7 | 3
321 | 6 | 2 | 0 | 2
With the following:
SELECT
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 6),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 5),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 4),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 3),
Callbacks.UserID
FROM
Callbacks
In English I want each user to be listed and each entitiy with that user and the Count for specific values for StatusID to be shown also. But how? All I can get is a total for all.
I am trying to get the results similar to the below with this...
UserID | Exp1 | Exp2 | Exp3 | Exp4
-----------------------------------
123 | 1 | 9 | 7 | 3
321 | 6 | 2 | 0 | 2
With the following:
SELECT
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 6),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 5),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 4),
(SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID = 3),
Callbacks.UserID
FROM
Callbacks
In English I want each user to be listed and each entitiy with that user and the Count for specific values for StatusID to be shown also. But how? All I can get is a total for all.