I have a query where I want to group by to show count of amount of each value in a filed and would like to UNION a second query which Should show Grand Total and Count of All items. Here is the abstract of my query.
SELECT a.[Field to Count], Count(a.[Field to Count]) as Count
FROM MyTable as a
Where a.[Some Field] = "Value1" AND a.[Some other Field] <> "Some value"
Group By a.[Field to Count]
UNION
SELECT "Grand Total", Count(*)
FROM MyTable as a
Where a.[Some Field] = "Value1" AND a.[Some other Field] <> "Some value"
Group By ?
What is want is this:
Field to Count ========= Count
Value1 ================ Count of Value1
Value2 ================ Count of Value2
Value3 ================ Count of Value3
"Grand Total" ========= Count of All Field to Count Values
I know that without the Group By in the Second query it will not display anything so I know I need to use this. Basically something like "Group By *"
Any suggestions?