I have a table of tags and want to get the highest count tags from the list.
Sample data looks like this
id (1) tag (\'night\') id (2) tag (\'awesome
Try this query
SELECT data_collector_id , count (data_collector_id ) as frequency from rent_flats where is_contact_person_landlord = 'True' GROUP BY data_collector_id ORDER BY count(data_collector_id) DESC