SELECT title, count(*) as count
FROM films
GROUP BY title
ORDER BY count DESC
LIMIT 1
This will count the number of rows for each heading and return only the highest heading. Remove the restriction if you want all the titles to be sorted by the maximum number of titles.
This query will return something like:
+-------------+-------+
| title | count |
+-------------+-------+
| Toy Story 3 | 3 |
+-------------+-------+
source
share