Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query group by
Message
From
22/02/2017 02:46:04
 
 
To
21/02/2017 20:22:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648180
Message ID:
01648328
Views:
40
>At the risk of looking foolish again.............
>
>Your result works because qty is unique. Give the different names the same MAX(qty) and you'll wind up with extra rows. I believe you need
>
>select table1.*; && or table1.id, table1.names, etc.
> from table1;
>   join (select id, max(qty) as qty from table1 group by id) table2 on table1.id = table2.id AND table1.qty = table2.qty
>
thanks for confirming, I mentioned the same caveat earlier in this thread
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Reply
Map
View

Click here to load this message in the networking platform