I have different MySQL SELECT queries, all with different where statements. These produce totals, unique totals, totals of a certain type.
So for-instance:
Loc | total | unique | missing
London | 10 | 5 | 2
New York |20 |10 |5
Currently I am running each of these Select queries separately, but I’d rather run them all at once. Is there a way to do this in MySQL?
Something like:
SELECT
Location
Count(total)
SELECT
count(unique)
FROM
.. my tables..
WHERE
.. where clause for unique part ..
GROUP BY
unique
FROM
.. my tables ..
WHERE
.. where clause for total part ..
GROUP BY
total
Thank you all. For anyone else trying to get to grips with this, my eventual solution was: