kmillecam — 2010-04-07T12:36:06-04:00 — #1
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.
swampboogie — 2010-04-07T12:49:24-04:00 — #2
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
kmillecam — 2010-04-07T13:07:58-04:00 — #3