Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Multiple Counts in a single SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-23 : 00:29:32
Gregory writes "I've searched your site for a question that I have. I found a response which didn't answer the specific question I had. Here it is:


I have a database of two tables and I'm attempting to generate
a summary of activities for each Member.

Here are the simple structures of my tables

== Member table ================
MemberID Member Name
1 Gregory
2 David
3 John

== Activities table =============
ActivityID MemberID Activity Type
1 1 call
2 1 call
3 2 call
4 1 fax
5 2 fax


The queries that I'm generating are not working to generate
a summary recordset that looks like this:

Name		countofCalls	CountofFaxes
Gregory 2 1
David 1 1
John 0 0


I've been working with SQL for a year and I've drawn
a blank. Any suggestions?

----------------
Gregory Wexler
sqlGuy@clubtel.com"
   

- Advertisement -