Skip to content

Instantly share code, notes, and snippets.

@alxfv
Created May 22, 2014 07:13
Show Gist options
  • Select an option

  • Save alxfv/1af33129bcd21694436c to your computer and use it in GitHub Desktop.

Select an option

Save alxfv/1af33129bcd21694436c to your computer and use it in GitHub Desktop.
select
td.tid, td.name, count(n.nid) as cnt
from `term_data` as td
inner join `content_field_author` ca on ca.field_author_value = td.tid
inner join node n on n.nid = ca.nid
where (td.vid = 2 and n.type = 'article')
and (n.created >= 1396310400 and n.created <= 1398816000)
group by n.nid
order by cnt desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment