Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tricky SQL question
Message
De
24/09/2001 00:47:13
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
24/09/2001 00:32:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00559844
Message ID:
00559847
Vues:
12
Robert,

If any of the Qty items will do, then either the MAX() or the MIN() Qty will meet your criteria.
SELECT Item, MIN(Qty) FROM MyTable GROUP BY Item
>Hi All,
>
>I have a table containing two fields, Item and Qty. Neither field is uniue. I need to select the distinct list of items from the table, and any one of the 'associated quantities'. Eg:
>
>Item Qty
>A 2
>A 4
>A 6
>B 3
>C 7
>C 9
>
>Results I want are:
>
>A 2 (or 4 or 6)
>B 3
>C 7 (or 9)
>
>Thanks,
>Rob
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform