Skip to content

Instantly share code, notes, and snippets.

@Ironholds
Created January 31, 2013 16:53
Show Gist options
  • Save Ironholds/4684299 to your computer and use it in GitHub Desktop.
Save Ironholds/4684299 to your computer and use it in GitHub Desktop.
SELECT recentchanges.rc_user AS revs,
(CASE WHEN user_properties.up_value IN (1,'nostalgia') THEN 'nostalgia'
WHEN user_properties.up_value IN (2,'cologneblue') THEN 'cologneblue'
WHEN user_properties.up_value = 'myskin' THEN 'myskin'
WHEN user_properties.up_value = 'simple' THEN 'simple'
WHEN user_properties.up_value = 'standard' THEN 'standard'
WHEN user_properties.up_value = 'modern' THEN 'modern'
WHEN user_properties.up_value = 'monobook' THEN 'monobook'
WHEN user_properties.up_value = 'chick' THEN 'chick'
ELSE 'vector' END) AS skin
FROM recentchanges
LEFT JOIN user_properties ON user_properties.up_user = recentchanges.rc_user
WHERE user_properties.up_property = 'skin' AND recentchanges.rc_namespace = 0 AND recentchanges.rc_type < 2
GROUP BY revs
HAVING revs >= 5;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment