I have a table within my database that has many records, some records share the same value for one of the columns. e.g.
| id | name | software |
______
It depends if you want to use standard SQL or vendor specific extensions (another poster has a "top N" query which is not standard). A standard solution would be.
SELECT software, COUNT(1)
FROM tablename
GROUP BY software
HAVING COUNT(1) = (
SELECT MAX(sc) FROM (
SELECT software, COUNT(1) sc
FROM tablename
GROUP BY software
)
)
Note: this may return multiple rows if several pieces of software are tied for the most occurrences.