Dear legends ,
Am a final year BSc Info Tech student..
Am doing the project on asp.net. in vb..
Tittle is "Online Voting"
Now am final stage as resulting page...
Now I have some troubles to show the voting result..
On my project votes are on the database..
ID Name VoteFor
1 Abc A
2 Cba B
3 acd A
4 Dcb A
So now i want to produce the result as
"the winner is A and he got 3 Votes"

Manas MohapatraRank #182 · 13.2K reputationPosted Jul 19, 2015, 3:45 AM EDT
Manoj BhoirRank #599 · 4K reputationPosted Jul 19, 2015, 6:04 AM EDT
Select TOP(1) VoteFor, Count(*)As TotalVotes From Vote Group By VoteFor Order By TotalVotes Desc
This query will give you Single Record with highest Votes. Using SQLReader and ExecuteReader of SQLCommand you can display your final result.Mano Haran9 reputationPosted Jul 19, 2015, 10:23 PM EDT
Mano Haran9 reputationPosted Aug 4, 2015, 8:55 PM EDT
Mano Haran9 reputationPosted Aug 4, 2015, 8:55 PM EDT