Counts by dates

  • Thread starter Thread starter John
  • Start date Start date
Vague response to vague question.

Use a UNION ALL query as the source of a Totals (aggregate) query.

or try something like

SELECT Sum(RecordCount) as TotalRecords
FROM (
SELECT Count(*) as RecordCount
FROM TableA
WHERE SomeDate = SomeCriteriaDate
UNION ALL
SELECT Count(*)
FROM TableB
WHERE SomeDate = SomeCriteriaDate
UNION ALL
SELECT Count(*)
FROM TableC
WHERE SomeDate = SomeCriteriaDate)
 
Why not the same way you would do this with a single query only do it five
or more times?
 
Back
Top