Query in database

Solved/Closed
paul - 9 Aug 2010 à 02:11
 paul - 10 Aug 2010 à 03:03
Hello,

my name is paul.. i just want to know if it is possible to query on sql server and in access 2007.. i am doing an election system.. im wondering on how can i count the votes of single person only.. tnx all answers were highly appreciated..

Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
9 Aug 2010 à 14:33
Yes you an query any database (if you have permissions to tables and columns)

How can you get a count depends the structure of the table


SELECT PERSON_ID, count(*) from mytable group by PERSON_ID

this statement is grouping data on a column person_id, and for each person_id gives you a total

This is just an example. The sql depends on table layout.
thanks for your help... i think ive already encountered this statement... thanks to you now i remember... :)