I'm writing a SQL statement for my MS Access database, and the purpose is to count values from 3 different queries, so I tried this way:
SELECT(query1 + query2 + query3) AS Qtd
Each query returns an unique value from an aggregate function count, i.e, query1 = SELECT Count(something) FROM Table WHERE...
Everything should work fine, but MS Access demands a FROM
clause. When I put a table in that query (not changing the SELECT
statement above), I end up with tones of rows and each row the result expected from Qtd
column.
So is there any way to skip the FROM
Clause or the only option to work around is write TOP 1
(or DISTINCT
) to not get tones of duplicated rows because of the unnecessary table in FROM
clause?