Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New QUIZ Section
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00069395
Message ID:
00069442
Vues:
36
>>>The quiz said that choice C was correct. But it should be something like:
>>>SELECT invoiceno, cnt(*) as InvCount from invoice into cursor MyCosts group by invoiceno
>>
>>Mark, I think your answer and the Quiz answer give identical results.
>
>But... should the column in the result set be called TotCost? The question asked for (something like) the number of items per invoice... i.e., aggregating on InvoiceNo. TotCost would logically mean SUM(Cost), no? Why use Cnt(Cost)?
One could just as easily use Cnt(InvoiceNo) or Cnt(*). I think that Cnt(*) is the least ambiguous way to indicate that you intend only to be counting instances at the given aggregation level.

True - it WOULD have been a little clearer.

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform