Skip to content

Instantly share code, notes, and snippets.

@Blake-
Created January 13, 2018 14:20
Show Gist options
  • Save Blake-/3a6a3887a68592430982331fc19b4dea to your computer and use it in GitHub Desktop.
Save Blake-/3a6a3887a68592430982331fc19b4dea to your computer and use it in GitHub Desktop.
mysql select popular Drupal nodes from a specific year
SELECT node_counter.totalcount as count, node.title, DATE_FORMAT(FROM_UNIXTIME(node.created), '%e %b %Y')
FROM node_counter, node WHERE node.nid = node_counter.nid and
FROM_UNIXTIME(node.created, '%Y') = 1999 order by count desc limit 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment