UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Top 20 most answered questions, Office 2003    
 
   
greenlee
post Apr 26 2010, 01:54 PM
Post #1

New Member
Posts: 4



Hi,

I have a database that contains various tables (These are a stripped down version of the tables)

tbl_question
questionID
question

tbl_response
responseID
questionID
clientID
response

tbl_client
clientID
clientInfo


I need to get the top 20 questions that have been answered the most times. I thought using COUNT would work til I realized it didn't work the way I thought it did.
I could certainly use some help figuring this out...
Go to the top of the page
 
+
RAZMaddaz
post Apr 26 2010, 02:06 PM
Post #2

UtterAccess VIP
Posts: 6,171
From: Bethesda, MD USA



Try the following:

SELECT TOP 20 tbl_response.question_ID, Count(tbl_response.question_ID) AS CountOfquestion_ID
FROM tbl_response
GROUP BY tbl_response.question_ID;
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 12:11 AM