SQL
x
USE trwiki_p;
SET @N = 0;
SET @M = round(1.05 * @N,2);
SELECT *, round(top/ec,2) as ort from (
SELECT concat("tr.wikipedia.org/wiki?curid=",fpp_page_id) as url, page_title
, datediff(now(),fpp_pending_since) as sc, sum(round(timediff(now(),rev_timestamp)/240000,3)) as top, count(*) as ec
from flaggedpage_pending join revision_userindex on rev_page = fpp_page_id join page on page_id = fpp_page_id
where fpp_page_id <> 26386 and rev_timestamp>=fpp_pending_since and timediff(now(),rev_timestamp)/240000 > @N
and page_namespace = 0
group by fpp_page_id
) as groo
where top/ec > @M
order by top desc
;
/*
SELECT concat("tr.wikipedia.org/wiki/Dosya:",replace(p.page_title," ","_")), c.cl_to, p.page_is_redirect
from page p left join categorylinks c on c.cl_from = p.page_id
where p.page_namespace = 6 and p.page_id NOT IN (select pp.page_id from page pp left JOIN categorylinks cc ON cc.cl_from = pp.page_id where cc.cl_to IN ("Tüm_adil_kullanım_dosyaları", "Adil_kullanım_sembolleri"))
and c.cl_to is NULL and p.page_is_redirect = 0
limit 10;
-- */ /*
SELECT *
from page p join iwlinks iwl on iwl.iwl_from = p.page_id
where p.page_namespace = 6 and iwl.iwl_prefix like "c%"
and iwl.iwl_title rlike "Image:"
limit 10;
*/
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.