Fork of
Peek one record from the page table
by Davesh0
This query is marked as a draft
This query has been published
by Davesh0.
SQL
x
select p.page_title, group_concat(c.cl_to), r.rev_timestamp from page p
join revision r on p.page_latest=r.rev_id
join categorylinks c on c.cl_from=p.page_id
where p.page_namespace=0
and p.page_is_redirect=0
and r.rev_timestamp<'20200101000000'
group by p.page_title;
#limit 2;
/*select p.page_title, group_concat(c.cl_to) from page p
join revision r on p.page_latest=r.rev_id
join categorylinks c on c.cl_from=p.page_id
where p.page_namespace=0
and p.page_is_redirect=0
and p.page_title='History_of_Afghanistan'
group by p.page_title
limit 50;*/
#select * from page limit 1;
/*select p.page_title, count(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p
join revision r on p.page_latest=r.rev_id
join categorylinks c on c.cl_from=p.page_id
where p.page_namespace=0
and p.page_is_redirect=0
and r.rev_timestamp<'20200101000000'
limit 5;*/
#select * from page p
#join revision r on p.page_latest = r.rev_id # 1140660562;
#where page_title ="Virat_Kohli" and page_namespace=0;
/*select * from page p
join revision r on p.page_latest=r.rev_id
where p.page_title='History_of_Afghanistan' and p.page_namespace=0;*/
/*select p.page_title, count(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p
join revision r on p.page_latest=r.rev_id
join categorylinks c on c.cl_from=p.page_id
where p.page_title='History_of_Afghanistan' and p.page_namespace=0
;*/
/*select p.page_title, group_concat(c.cl_to), r.rev_timestamp, concat('https://en.wikipedia.org/', p.page_title) as URL from page p
join revision r on p.page_latest=r.rev_id
join categorylinks c on c.cl_from=p.page_id
where p.page_title='History_of_Afghanistan' and p.page_namespace=0
;*/
#select * from categorylinks c
#where c.cl_from=13813
/*# pages revised older than 2020 with page_len > 1000
select count(*) from page p
join revision r on p.page_latest=r.rev_id
where p.page_namespace=0
and p.page_is_redirect=0
and r.rev_timestamp<'20200101000000'
and p.page_len > 1000
limit 100;*/
/*select count(*) from page p
where p.page_namespace=0
and p.page_is_redirect=0;*/
/*select count(*) from page p
join revision r on p.page_latest=r.rev_id
where p.page_namespace=0
and p.page_is_redirect=0
and r.rev_timestamp<'20200101000000';
*/
/*select * from page p
join revision r on p.page_latest=r.rev_id
where p.page_namespace=0
and p.page_is_redirect=0
and r.rev_timestamp<'20200101000000'
limit 5;*/
#select * from page p
#join revision r on p.page_latest = r.rev_id # 1140660562;
#where r.rev_timestamp < '20190318030012' #and
#p.page_touched < '20190318030012'
#limit 5;
# left coast
#select * from page p #;
#join revision r on p.page_latest = r.rev_id #1127822228
#where p.page_id = 1131728;
#select * from revision r
#where r.rev_page = 1131728
#order by rev_timestamp desc;
#select * from page p
#where p.page_touched < 20190318030012 limit 5;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.