6. MICROSOFT ACCESS QUERIES – ADVANCED
6.3.1: Top Values
You can change the selection for Top Values. The default is ALL which results in all rows displayed when the query is run, but you can use this property to limit the rows displayed. As indicated below you can type an explicit number of rows such as 5, or a specific percentage of rows to be displayed.
Example
Consider the Library database where the Member table has one row per member. Sample are shown below:
Suppose we wanted to know who is the youngest member. One way to find out is to sort the members by birthdate and then pick either the first or last row according to how you ordered them (descending or ascending). Consider the following where the members are sorted in descending order by birthdate and then we list the first row by specifying Top Values = 1:
For the sample rows the query produces the result: