Last active
December 11, 2015 23:29
-
-
Save Ironholds/4677428 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT recentchanges.rc_user, | |
(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 OUTER JOIN user_properties ON user_properties.up_user = recentchanges.rc_user | |
WHERE user_properties.up_property = 'skin' | |
GROUP BY recentchanges.rc_user | |
HAVING COUNT(recentchanges.rc_id) >= 5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment