SQL
AخA
USE commonswiki_p;
# Get all users who uploaded files to WLM in 2018
SELECT
DISTINCT CONCAT("{{#target:User talk:", img_user_text, "}}") AS user
FROM page
JOIN categorylinks
ON cl_from = page_id
LEFT JOIN image_compat
ON page_title = img_name
WHERE cl_to IN ("Images_from_Wiki_Loves_Monuments_2018_in_Germany", "Images_from_Wiki_Loves_Monuments_2017_in_Germany", "Images_from_Wiki_Loves_Monuments_2016_in_Germany")
# Exclude users who uploaded stuff yet
#AND img_user_text NOT IN
# (SELECT
# DISTINCT img_user_text AS user2
#FROM page
#JOIN categorylinks
# ON cl_from = page_id
#INNER JOIN image
# ON page_title = img_name
#WHERE cl_to = "Images_from_Wiki_Loves_Monuments_2017_in_Germany"
#GROUP BY img_user_text
# )
GROUP BY img_user_text
;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.