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
Msz2001
.
Zapytanie zwraca listę edycji w danej kategorii i w podkategoriach w zadanym przedziale czasu
Toggle Highlighting
SQL
SET @category := 'Polscy_malarze_współcześni'; -- Nazwa kategorii (spacje zamienione na podkreślenia) SET @time_limit := '20220101'; -- Od jakiego momentu zbierać edycje (rok, miesiąc, dzień) SET @depth_limit := 10; -- Jaką głębokość drzewa kategorii uwzględnić WITH RECURSIVE subcategories(sbc_title, sbc_depth) AS ( SELECT @category, 0 FROM DUAL UNION ALL SELECT page_title, sbc_depth+1 FROM subcategories JOIN categorylinks ON cl_to = sbc_title JOIN page ON cl_from = page_id WHERE cl_type = 'subcat' AND sbc_depth <= @depth_limit ) SELECT DISTINCT rev_timestamp AS "Czas (UTC)", actor_name AS "Użytkownik", page_title AS "Strona", comment_text AS "Opis zmian", rev_id AS "ID wersji" FROM page JOIN categorylinks ON page_id = cl_from JOIN subcategories ON sbc_title = cl_to JOIN revision ON rev_page = page_id JOIN actor ON rev_actor = actor_id JOIN `comment` ON comment_id = rev_comment_id WHERE page_namespace = 0 AND rev_timestamp >= @time_limit ORDER BY rev_timestamp DESC LIMIT 1000; -- Ile edycji maksymalnie wylistować (od najnowszych)
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...