Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Maximilianklein
.
Arabic, German, Farsi, and Polish wiki definitions for users that could receive invites to participate in CivilServant study.
Toggle Highlighting
SQL
SET @DE_EDITS_ENOUGH = 500; SET @DE_DAYS_ENOUGH = 60; SET @FA_EDITS_ENOUGH = 500; SET @FA_DAYS_ENOUGH = 365; SET @AR_USER_GROUP = 'autoreview'; SET @PL_USER_GROUP = 'editor'; -- -------------------- use dewiki_p; select user_id, ug_group, user_name, user_editcount, user_registration from ( select user_id, ug_group, user_name, user_editcount, coalesce(user_registration, 20010101000000) as user_registration from (select * from user_groups where ug_group = 'autoreview') ug join user u on ug.ug_user = u.user_id) coal where user_editcount >= @DE_EDITS_ENOUGH and user_registration <= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL @DE_DAYS_ENOUGH DAY), '%Y%m%d%H%M%S'); -- -------------------- use fawiki_p; select * from ( select user_id, user_name, user_editcount, coalesce(user_registration, 20010101000000) as user_registration from user) u where user_editcount >= @FA_EDITS_ENOUGH and user_registration <= DATE_FORMAT(DATE_SUB(NOW(), INTERVAL @FA_DAYS_ENOUGH DAY), '%Y%m%d%H%M%S'); -- -------------------- use arwiki_p; select * from ( select user_id, user_name, ug_group, coalesce(user_registration, 20010101000000) as user_registration from (select * from user_groups where ug_group = @AR_USER_GROUP) ug join user u on ug.ug_user = u.user_id) coalesced; -- -------------------- use plwiki_p; select * from ( select user_id, user_name, ug_group, coalesce(user_registration, 20010101000000) as user_registration from (select * from user_groups where ug_group = @PL_USER_GROUP) ug join user u on ug.ug_user = u.user_id) coalesced;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...