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
Alisa.antypova
.
Toggle Highlighting
SQL
# #len of article (total - month - week - day before, same), page namespace # revisions SELECT page.page_title, page.page_id, page.page_len as page_len_today, min(revision.rev_timestamp) as created_at, count(revision.rev_id) as count_rev_today, sum(case when revision.rev_timestamp<='20220102000000' then 1 else 0 end) as count_rev_before_event_day, sum(case when revision.rev_timestamp='20220102000000' then 1 else 0 end) as count_rev_event_day, # rev_minor_edit sum(case when revision.rev_timestamp BETWEEN '20220102000000' AND ('20220102000000'- INTERVAL 1 WEEK) then 1 else 0 end) as count_rev_event_week, sum(case when revision.rev_timestamp BETWEEN '20220102000000' AND ('20211202000000'- INTERVAL 1 MONTH) then 1 else 0 end) as count_rev_event_month, sum(case when revision.rev_timestamp<='20220102000000' then revision.rev_len else 0 end) rev_len_before_event_day, avg(case when revision.rev_timestamp<='20220102000000' then rev_minor_edit end) prop_minor_before_event_day FROM page LEFT JOIN revision on revision.rev_page = page.page_id # and revisions.rev_timestamp<='' WHERE page_title ='Prime_Minister_of_Haiti' and page_namespace=0 GROUP BY 1,2,3 #max(categorylinks.cl_to) categorylinks_today, #LEFT JOIN categorylinks ON categorylinks.cl_from=page.page_id # # internal links # SELECT pl_from # FROM pagelinks # LIMIT 100; # #number of external links # SELECT el_from # FROM externallinks # LIMIT 100; #'Marshall_Fire'????
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...