How to List Number of Records in Each Group of a SQL Group ByID: Q133023 The information in this article applies to:
SUMMARYThis article shows by example how to find out how many records occur in each group of a query that groups the records. You can do this by using the Query Designer or the SQL statement it creates.
MORE INFORMATION
Step-by-Step ExampleThis example uses the CUSTOMER.DBF table found in the VFP\SAMPLES\DATA subdirectory. The example groups the table by Country, and produces a cursor that has a record for each country with the number of records that appear in that country. 1. On the File menu, click New, and then click Query. Base the query on 2. Select the Fields tab on the Query Designer. Drag the Customer.country
3. Select the Group By tab, and drag the Customer.country field onto the
4. Click the SQL button on the Query Designer toolbar to see the SQL
5. Close the SQL statement window. Click the exclamation button on the
Additional reference words: 3.00 VFoxWin Structured Query Language
KBCategory: kbtool kbprg
KBSubcategory: FxtoolQueryvwdes
|
Last Reviewed: July 31, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |