--Supplier Count
SELECT id, COUNT (*) AS cnt
FROM atable
WHERE id IN ('1','2',3')
GROUP BY id
ORDER BY id
--id Count
SELECT id, COUNT (*) AS cnt
FROM btable
WHERE id IN ('1','2',3')
GROUP BY id
ORDER BY id
How do I add the Count of id's1,2,3 from atable and btable in one piece of code without having to process atable and btable separately then adding the Counts for each supplier in Excel?
↧