borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Connecting to mySQL)Next Topic (How to add a column to an SQL database) New Topic New Poll Post Reply
AndreaVB Forum : Database : Record count - Entered the most times
Poster Message
mhpate
Level: Trainee

Registered: 21-04-2007
Posts: 3

icon Record count - Entered the most times

Is therw away I can find out which number has been entered the most?
I have a field that will have numbers from 1 - 44
I need to find wich number has been entered the
greatest number of times
the second and third.
fld name Mb.

23-04-2007 at 12:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
vbgen
Level: Moderator

Registered: 10-10-2002
Posts: 876
icon Re: Record count - Entered the most times

SELECT field, COUNT(*)
FROM table
GROUP BY field
HAVING COUNT(*) >= ALL
(SELECT COUNT(*)
FROM table
GROUP BY field)


uhmm.. it won't answer your entire question, but can you try and start with that?

____________________________
Been busy trying to take a second degree <--it's not working out...

23-04-2007 at 01:36 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Database : Record count - Entered the most times
Previous Topic (Connecting to mySQL)Next Topic (How to add a column to an SQL database) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder