Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COMPLEX or simple SQL exercise?
Message
From
27/09/2000 12:02:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00421510
Message ID:
00421532
Views:
17
>I am having trouble isolating records in a table that have the highest price but the nouns are the same. So if there are 50 tables, 25 chairs, 200 lamps with varying prices for each, I want a list of 3 items, a table, a chair, and a lamp, with each of the 3 having the highest price in its category.
>Is there a way to prg this in foxpro or is sql needed?


SQL is the easiest way Tim IMHO.
Select itemname, max(price) as Highest from mytable group by 1
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform