I have two columns 'Team' and 'WLD' in a mysql database. WLD stands for Won, Lost, Drawn and contains either a W, L or D on every line of hundreds. I want to output how many W's, L's and D's there are in the column in one SELECT.
If I do this with one of them it works:
SELECT Team, COUNT(WLA) AS Won FROM ResultsTest WHERE WLA = 'W'
However, as soon as I add another COUNT statement it starts to complain:
SELECT Team, COUNT(WLA) AS Won
FROM ResultsTest
WHERE WLA = 'W',
COUNT(WLA) AS Lost FROM ResultsTest WHERE WLA = 'L'
Where am I going wrong?