Counts by dates

  • Thread starter Thread starter John
  • Start date Start date
J

John

How do I enter a query to count records by specific dates
within five or more tables
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top