Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
WikiDaheim users 2024 (by first revision, by uploader)
by
Herzi Pinki
This query is marked as a draft
This query has been published
by
Herzi Pinki
.
WikiDaheim files by year and campaign accumulated till current (by first revision, by uploader). add new years in intervals, add new campaigns at the bottom group by year only to acc. over all campaigns campaigns are used by wikidaheim and by various lists. they are not used using alternate upload mechanism.
Toggle Highlighting
SQL
SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count FROM actor, revision, image, page, categorylinks WHERE page.page_id=categorylinks.cl_from AND actor.actor_id = revision.rev_actor AND image.img_name = page.page_title and revision.rev_page = page.page_id and revision.rev_parent_id = 0 AND categorylinks.cl_to = "Uploaded_via_Campaign:WikiDaheim-at-wd" #AND categorylinks.cl_to = "Prejury_selection_for_WikiDaheim_2023_in_Austria" GROUP BY user ORDER BY img_count DESC limit 300; SELECT /* SLOW_OK */ DISTINCT actor_name AS user, COUNT(image.img_name) as img_count FROM image JOIN page AS page_img ON image.img_name = page_img.page_title JOIN categorylinks ON page_img.page_id = categorylinks.cl_from JOIN revision ON revision.rev_page = page_img.page_id JOIN actor ON actor.actor_id = revision.rev_actor where categorylinks.cl_to = "Uploaded_via_Campaign:WikiDaheim-at-wd" and revision.rev_parent_id = 0 GROUP BY user ORDER BY img_count DESC limit 300; SELECT /* SLOW_OK */ DATE_FORMAT(DATE_ADD(img_timestamp, INTERVAL 2 HOUR),'%Y') AS date, COUNT(image.img_name) as images FROM image JOIN page ON image.img_name = page.page_title JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE categorylinks.cl_to = "Uploaded_via_Campaign:WikiDaheim-at-wd" AND img_timestamp BETWEEN '20220630220000' AND '20231008220000' GROUP BY date desc; # ----------------- WITH date_intervals AS ( SELECT YEAR(img_timestamp) AS year, #COUNT(CASE WHEN img_timestamp BETWEEN CONCAT(YEAR(img_timestamp), '0701000000') AND CONCAT(YEAR(img_timestamp), '0831000000') THEN 1 END) AS wikiDaheim, #COUNT(CASE WHEN img_timestamp < CONCAT(YEAR(img_timestamp), '0701000000') OR img_timestamp > CONCAT(YEAR(img_timestamp), '0831000000') THEN 1 END) AS outside_wikiDaheim #COUNT(CASE WHEN img_timestamp BETWEEN '20230630220000' AND '20231008220000' THEN 1 END) AS wikiDaheim, #COUNT(CASE WHEN img_timestamp < '20230630220000' OR img_timestamp > '20231008220000' THEN 1 END) AS outside_wikiDaheim, COUNT(CASE WHEN (img_timestamp BETWEEN '20230630220000' AND '20231008220000') OR (img_timestamp BETWEEN '20220630220000' AND '20221008220000') OR (img_timestamp BETWEEN '20210630220000' AND '20211008220000') OR (img_timestamp BETWEEN '20200630220000' AND '20201008220000') THEN 1 END) AS wikiDaheim, COUNT(CASE WHEN (year=2023 and (img_timestamp < '20230630220000' OR img_timestamp > '20231008220000')) OR (year=2022 and (img_timestamp < '20220630220000' OR img_timestamp > '20221008220000')) OR (year=2021 and (img_timestamp < '20210630220000' OR img_timestamp > '20211008220000')) OR (year=2020 and (img_timestamp < '20200630220000' OR img_timestamp > '20201008220000')) THEN 1 END) AS outside_wikiDaheim FROM image JOIN page ON image.img_name = page.page_title JOIN categorylinks ON page.page_id = categorylinks.cl_from WHERE categorylinks.cl_to = 'Uploaded_via_Campaign:WikiDaheim-at-wd' #AND img_timestamp BETWEEN '20220630220000' AND '20231008220000' GROUP BY year ) SELECT year, wikiDaheim, outside_wikiDaheim FROM date_intervals ORDER BY year DESC;
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...