You can use these expressions in a calculated field in a query.
| Expression |
Description |
| Category: (SELECT [CategoryName] FROM [Categories] WHERE [Products].[CategoryID] = [Categories].[CategoryID]) |
Displays in the Category field the CategoryName, if the CategoryID from the Categories table is the same as the CategoryID from the Products table. |
| AveragePrice: (SELECT AVG([UnitPrice]) FROM [Products] WHERE [Products].[Salesman] = [Categories].[Salesman]) |
Displays in the AveragePrice field the average of the values in the UnitPrice field for records, where the Salesman from the Categories table is the same as the Salesman in the Products table. |