Need help composing a SQL statement

Have a look at my attached xls file.  It provides the tables I'm referring to and the two sets of results (scroll right to see them) I'm looking to return.

I need both statement to return values based on the EventID and the number of Leads based on that EventID.

I'm really hoping someone can help me because I don't even know where to being.  It is just too advanced for me.  

Could someone please look at my problem and post the T-SQL statement that would return my desired result?  Thanks You.  I'm truly stumped.
Report-Help.xls
cdemott33Asked:
Who is Participating?
 
appariCommented:
try this
Select 
 A.AnswerOption, count(L.LeadID)
From Answers A Join Question Q
on A.QuestionID = Q.QuestionID
Left Outer Join QuestionnaireResults QR
on QR.QuestionID = Q.QuestionID 
and A.AnswerID = QR.AnswerID
Left outer join Leads L
on QR.LeadID = L.LeadID
where L.EventID=1
Group by A.AnswerOption

Open in new window

0
 
Scott PletcherSenior DBACommented:
I'm not seeing anything in the attachment.
0
 
cdemott33Author Commented:
Let me try again.
Report-Help.xls
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Scott PletcherSenior DBACommented:
Nope, still nothing.  Maybe it's my version of Excel (2010)?
0
 
cdemott33Author Commented:
Very odd.  I'm saving it as an Excel 97-2003 file so it should open up in 2010 without issue.  Let me try something different.  Please stand by.
0
 
cdemott33Author Commented:
I convert it into a PDF file.  You'll have to zoom in to see it but hopefully you can open this up and see the data.
Report-Help.pdf
0
 
Scott PletcherSenior DBACommented:
OK, I can see it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.