SQL
AخA
use fawiki_p;
select page_title, str_to_date(left(rev_timestamp, 8), '%Y%m%d'), count(pl_from)
from page
join revision
on page_latest = rev_id
left join categorylinks
on page_id = cl_from
and cl_to = 'صفحه•های_ابهام•زدایی'
left join
(
select pl_title, pl_namespace, pl_from_namespace
from pagelinks
left join page
on page_id = pl_from
and page_is_redirect = 0
) pl
on page_title = pl_title
and pl_namespace = 0
and pl_from_namespace = 0
where page_namespace = 0
and page_is_redirect = 0
and rev_timestamp < concat(date_format(date_sub(now(), interval 4 year), '%Y%m%d'), '000000')
and cl_to is null
group by page_title, str_to_date(left(rev_timestamp, 8), '%Y%m%d')
order by rev_timestamp asc
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.