Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count in SELECT-SQL
Message
From
02/10/2000 10:07:31
Fida Shamsoodeen
Combined Systems (Pty) Ltd
Centurion, South Africa
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00423386
Message ID:
00423400
Views:
12
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!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform