Using Microsoft Office for Mac as a Relational Database

By Jim Gordon, co-author of Office 2011 for Mac All-in-One For Dummies.

Part 12 - Count and Group By example SQL

This query example lists each city and the number of orders sent to that city from the ExampleData.xls database.

Queries that use COUNT can not be displayed by Microsoft Query. You must enter the text of this query in SQL View in Microsoft Query.

If you try to switch to Query View an error will occur.

The TEST button does work and can be used to see the result set in Microsoft Query.

SELECT ShipToCity, Count(*) as CountOfOrders FROM Orders GROUP BY ShipToCity


Tip: Sometimes certain characters in the font within a data source can cause odd behavior. This can be due to the language of the source data; or perhaps special characters are in the source table.
Part 1
Part 11 Part 13 (Next)