Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count in SELECT-SQL
Message
De
02/10/2000 10:07:31
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, Afrique du Sud
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00423386
Message ID:
00423400
Vues:
13
hi Larry,

Thanks for the prompt reply. Will try this out right now

:)
Fida

>Try something like:
>select department.dept, category.categ, count(assets.categ) as 'Cnt' ;
>   from department, category, assets ;
>   where department.dept = assets.dept and category.categ = assets.categ ;
>   group by department.dept, category.categ
>HTH.
>
>>Hi All
>>
>>Please help with this problem.
>>I have 3 tables :
>>1. Assets
>>2. Category
>>3. Department
>>
>>I wish to create a query that does the following :
>>It shows for e.g. in department 1 i have 30 CPU's.
>>It must show the count of each category but not the individual items
>>
>>Department 1, CPU's , 30
>>Department 1, CD-ROM's , 12
>>Department 1, Chairs , 5
>>Department 2, CPU's , 11
>>Department 2, CD-ROM's , 22
>>Department 2, Chairs , 15
>>
>>Assets file MUST be linked to Department file and Category File
>>Assets file has a field called Dept and department file has a field called Dept.
>>Assets file has a field called categ and the category file has a field called categ.
>>
>>Thanks in advance
Wannabe FoxPert!!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform