I'm trying to pull a count of termIDs from one table and the term_name from another table.
Here's the query that's working to get the count:
SELECT value AS tid, COUNT(value) AS count FROM
notifications_fields WHERE field = 'tid' GROUP BY value ORDER BY count DESC;
Now I need to pull the term_name from the term_data table. Both tables (notifications_fields and term_data) have tid columns.
select value AS tid,
count(value) as count
on notifications_fields.tid = term_data.tid
where field = 'tid'
group by value,
order by count desc