Skip to content

Instantly share code, notes, and snippets.

@webchick
Last active December 22, 2015 12:18
Show Gist options
  • Save webchick/6471373 to your computer and use it in GitHub Desktop.
Save webchick/6471373 to your computer and use it in GitHub Desktop.
SQL Queries to determine d.o brainstorming participation
# 258 people in total participated.
SELECT DISTINCT u.name FROM users u
INNER JOIN node n ON u.uid = n.uid
INNER JOIN og_ancestry o ON n.nid = o.nid
WHERE
group_nid = 312008 /* Drupal.org brainstorming */
UNION
SELECT DISTINCT u.name
FROM users u
INNER JOIN comments c ON u.uid = c.uid
INNER JOIN og_ancestry o ON c.nid = o.nid
WHERE
group_nid = 312008 /* Drupal.org brainstorming */
UNION
SELECT DISTINCT u.name
FROM users u
INNER JOIN votingapi_vote v ON v.uid = u.uid
INNER JOIN og_ancestry o ON v.content_id = o.nid
WHERE
group_nid = 312008 /* Drupal.org brainstorming */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment