Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select Top Ideas
Message
De
22/05/2003 11:45:16
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
22/05/2003 11:26:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00791658
Message ID:
00791670
Vues:
25
>I have a table of tree information that I need to get the tree species with the highest stocking for every plot in the table.
>
>I need to get the trees.species_98 with the highest sum(trees.ba_98)for every occurance of trees.plot in the table.
>
>Select top 1 only gives me the first plot.
>
>This statement get closer but I hardcoded in the number of plots which may not be known and also sum(trees.ba_98) is the trees.plot total and not the total of the highest trees.species.
>
>SELECT TOP 752 trees.species_98, sum(trees.ba_98), trees.plot FROM trees GROUP BY trees.plot ORDER BY trees.plot
>
>Any ideas would be greatly appreciated.

Quinn,
Would you elaborate a bit. How is the structure like, what should be summed with some sample data etc.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform