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
MMiller (WMF)
.
Toggle Highlighting
SQL
use enwiki_p; select status, case when cat.cl_from is not null then 'has it' else 'not has it' end as has_it, count(*) from (SELECT current_timestamp() as date, 'Declined' as status, tp.page_id, tp.page_title, cl1.cl_timestamp as pending_afc_submissions_time, cl2.cl_to as afc_pending_submission_by_age_value, cl2.cl_timestamp as afc_pending_submission_by_age_time FROM page tp LEFT JOIN categorylinks cl1 ON tp.page_id = cl1.cl_from AND cl1.cl_to = 'Pending_AfC_submissions' LEFT JOIN categorylinks cl2 ON tp.page_id = cl2.cl_from AND cl2.cl_to like 'AfC_pending_submissions_by_age%' LEFT JOIN templatelinks t ON tp.page_id = t.tl_from AND (tl_title = 'AFC_submission/declined') WHERE t.tl_from is not null AND cl1.cl_to is null AND tp.page_is_redirect = 0 AND tp.page_namespace = 118) declined left join (select distinct cl_from from categorylinks where cl_to like '%declined%') cat on declined.page_id = cat.cl_from group by 1,2
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...