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
.
Toggle Highlighting
SQL
SET @start_time := "2022-05-01 00:00:00"; -- Data początkowa (w CEST) SET @end_time := "2022-09-30 23:59:59"; -- Data końcowa (w CEST) -- Przekształć daty na format MediaWiki w UTC SET @start_time_mw := DATE_FORMAT(DATE_ADD(STR_TO_DATE(@start_time, "%Y-%m-%d %H:%i:%s"), INTERVAL -2 HOUR), "%Y%m%d%H%i%s"); SET @end_time_mw := DATE_FORMAT(DATE_ADD(STR_TO_DATE(@end_time, "%Y-%m-%d %H:%i:%s"), INTERVAL -2 HOUR), "%Y%m%d%H%i%s"); WITH user_timetable(ut_username, ut_start_time, ut_end_time) AS ( SELECT "Msz2001", "20220501000000", "20220930235959" UNION ALL SELECT "Piastu", "20220601000000", "20220630235959" ) SELECT DATE_FORMAT( DATE_ADD( STR_TO_DATE(rev_timestamp, "%Y%m%d%H%i%s"), INTERVAL 2 HOUR -- Zakładamy, że jesteśmy w CEST, czyli 2 godziny do przodu względem UTC ), "%Y-%m-%d %H:%i:%s" ) AS "Czas", user_name AS "Użytkownik", CONCAT( CASE WHEN page_namespace = 10 THEN "Szablon:" WHEN page_namespace = 14 THEN "Kategoria:" ELSE "" END, REPLACE(page_title, "_", " ") ) AS "Strona" FROM revision JOIN page ON page_id = rev_page JOIN actor ON rev_actor = actor_id JOIN user ON actor_user = user_id JOIN user_timetable ON user_name = ut_username AND rev_timestamp >= ut_start_time AND rev_timestamp < ut_end_time WHERE page_namespace IN (0, 10, 14); -- PG, szablon, kategoria
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...