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
Jean-Frédéric
.
Toggle Highlighting
SQL
use commonswiki_p; SELECT DISTINCT (user.user_name) as name, COALESCE(user_registration, 20000000000000) as user_registration, (CASE WHEN user_registration <= 20170901000000 THEN 0 ELSE 1 END) as newbie FROM (SELECT cl_to, cl_from FROM categorylinks WHERE cl_to = "Images_from_Wiki_Loves_Monuments_2017_in_France" AND cl_type = 'file') cats INNER JOIN page ON cl_from = page_id INNER JOIN image ON page_title = img_name LEFT JOIN oldimage ON image.img_name = oldimage.oi_name AND oldimage.oi_timestamp = (SELECT MIN(o.oi_timestamp) FROM oldimage o WHERE o.oi_name = image.img_name) LEFT JOIN user ON user.user_id = COALESCE(oldimage.oi_user, image.img_user) WHERE img_timestamp BETWEEN 20170901000000 AND 20170907000000
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...