Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Query group by
Message
From
20/02/2017 07:14:06
 
 
To
20/02/2017 06:49:31
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:
01648187
Views:
74
This message has been marked as the solution to the initial question of the thread.
>Sir, your query is displaying strange result
>
>id_a names date qty_a id_b qty_b
>1 ADMIN 2/19/2017 25 1 25
>2 GENERAL 2/17/2017 29 2 29


result is what you expect, you just need to specify the columns:
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.qty = table2.qty
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
Next
Reply
Map
View

Click here to load this message in the networking platform