Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Leonard Trevor
  Where is Leonard Trevor?
 Edinburgh
 United Kingdom
 Leonard Trevor
 Tags
Subject: grouping output
Thread ID: 248950 Message ID: 248950 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Friday, December 25, 2009 9:58:08 PM         
   


Dear expert,

The following data has to be grouped to generate a single line output.

The difference between the various amounts within each grade is the same.

grade notch amt
-------------------
AM 1 10
AM 2 30
AM 3 50
AM 4 70


AC 1 40
AC 2 55
AC 3 70
AC 4 85


expected result
--------------


grade min_amt max_amt difference
---------------------------------------------------------
AM 10 70 20
AC 40 85 15



Pls provide a select statement to enable me generate the expected result

Thanks

Merry Christmas to all.

ENTIRE THREAD

grouping output Posted by Leonard Trevor @ 12/25/2009 9:58:08 PM
RE: grouping output Posted by Yuri Rubinov @ 12/25/2009 10:42:21 PM