I have the following query:
SELECT location, COUNT( location ) AS Total, (
SELECT location, COUNT( location ) AS Responses
FROM `trespondent`
WHERE completion_status IN ('Started', 'Complete')
GROUP BY location
)
FROM `trespondent`
GROUP BY location
This brings back an error:
Operand should contain 1 column(s)
Which is entirely correct as there will be more than one row.
What I am trying to achieve, within a single query, is to bring back the Total number for each option in 'Location' and then also the the number that have 'Started or 'Completed' for each option in 'Location'.
Any suggestions if this is possible within a single query and if so, any pointers welcomed.