Skip to content

Instantly share code, notes, and snippets.

@EclipseGc
Created March 24, 2016 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EclipseGc/f8d61f8eeaf043db9131 to your computer and use it in GitHub Desktop.
Save EclipseGc/f8d61f8eeaf043db9131 to your computer and use it in GitHub Desktop.
SELECT
node_field_revision.changed AS node_field_revision_changed,
node_field_revision.title AS node_field_revision_title,
max(node_revision.vid) AS maxnode_revisionvid,
max(node_revision.revision_timestamp) AS maxnode_revisionrevision_timestamp,
MIN(node_field_revision.vid) AS vid
FROM {node_field_revision} node_field_revision
INNER JOIN {node_revision} node_revision ON node_field_revision.vid = node_revision.vid
GROUP BY
node_revision.vid,
max(node_revision.vid),
max(node_revision.revision_timestamp),
node_field_revision_changed,
node_field_revision_title
LIMIT 10
OFFSET 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment