Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
WikiDaheim files by year (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 accumulated till current (by first revision, by uploader). add new years in intervals, add new campaigns at the bottom
Toggle Highlighting
SQL
WITH intervals AS ( SELECT 1970 AS year, '19700630220000' AS start_date, '19701008220000' AS end_date # dummy to define cols UNION ALL SELECT 2017, '20170630220000', '20171007220000' UNION ALL SELECT 2018, '20180630220000', '20181007220000' UNION ALL SELECT 2019, '20190630220000', '20191006220000' UNION ALL SELECT 2020, '20200630220000', '20201004220000' UNION ALL SELECT 2021, '20210630220000', '20211003220000' UNION ALL SELECT 2022, '20220630220000', '20221002220000' UNION ALL SELECT 2023, '20230630220000', '20231008220000' UNION ALL SELECT 2024, '20240630220000', '20241006220000' ), date_intervals AS ( SELECT img_name, YEAR(img_timestamp) AS year, COUNT(CASE WHEN img_timestamp BETWEEN intervals.start_date AND intervals.end_date THEN 1 END) AS wikiDaheim, COUNT(CASE WHEN img_timestamp < intervals.start_date OR img_timestamp > intervals.end_date THEN 1 END) AS outside_wikiDaheim ,categorylinks.cl_to as cat FROM image JOIN page ON image.img_name = page.page_title JOIN categorylinks ON page.page_id = categorylinks.cl_from JOIN intervals ON YEAR(img_timestamp) = intervals.year WHERE categorylinks.cl_to in ( 'Media_from_WikiDaheim_2024_in_Austria/all', 'Media_from_WikiDaheim_2023_in_Austria/all', 'Media_from_WikiDaheim_2022_in_Austria/all', 'Media_from_WikiDaheim_2021_in_Austria/all', 'Media_from_WikiDaheim_2020_in_Austria/all', 'Media_from_WikiDaheim_2019_in_Austria/all', 'Media_from_WikiDaheim_2018_in_Austria/all', 'Media_from_WikiDaheim_2017_in_Austria/all' ) and concat ('Media_from_WikiDaheim_', YEAR(img_timestamp), '_in_Austria/all') != categorylinks.cl_to ) SELECT concat('[[File:',img_name,']]), year, wikiDaheim, outside_wikiDaheim ,cat FROM date_intervals ;
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...