Fork of Orphaned non-free files (lvwiki) by Edgars2007
This query is marked as a draft This query has been published by Bulgu.

SQL

x
 
USE trwiki_p;
SELECT NOW();
SELECT CONCAT('[[:Dosya:',p.page_title,']]') as dosya, concat('[[Kullanıcı:',rv.rev_user_text,'|]]') as kullanici
, min(rv.rev_timestamp) as olusturma
, CONCAT("tr.wikipedia.org/wiki?curid=",p.page_id) as link
, page_is_new as yeni_mi
, CONCAT("[[Özel:SayfayaBağlantılar/Dosya:",p.page_title,"|Sayfaya bağlantılar]]") as sb
FROM page p JOIN categorylinks c ON c.cl_from = p.page_id 
join revision_userindex rv ON rv.rev_page = p.page_id 
LEFT JOIN imagelinks i ON i.il_to = p.page_title
WHERE c.cl_to IN ("Tüm_adil_kullanım_dosyaları")
AND i.il_from is NULL
-- AND (i.il_from IS not NULL and p.page_title not in (select illl.il_to from imagelinks illl where il_from_namespace = 0) )
AND p.page_namespace = 6 and rv.rev_parent_id = 0
AND p.page_id not in (SELECT pl_from from pagelinks where pl_title rlike "Hızlı_silme"  ) 
AND rv.rev_user not in (select ipb_user from ipblocks)
GROUP by 1
Order by 2, 6, 1, 3
;  
SELECT CONCAT('[[:Dosya:',p.page_title,']]') as dosya, concat('[[Kullanıcı:',rv.rev_user_text,'|]]') as kullanici
, min(rv.rev_timestamp) as olusturma
, CONCAT("tr.wikipedia.org/wiki?curid=",p.page_id) as link
, ipb_expiry
, page_is_new as yeni_mi
, CONCAT("[[Özel:SayfayaBağlantılar/Dosya:",p.page_title,"|Sayfaya bağlantılar]]") as sb
FROM page p JOIN categorylinks c ON c.cl_from = p.page_id 
join revision_userindex rv ON rv.rev_page = p.page_id join ipblocks on ipb_user = rv.rev_user
LEFT JOIN imagelinks i ON i.il_to = p.page_title
WHERE c.cl_to IN ("Tüm_adil_kullanım_dosyaları")
AND i.il_from is NULL
AND p.page_namespace = 6 and rv.rev_parent_id = 0
AND p.page_id not in (SELECT pl_from from pagelinks where pl_title rlike "Hızlı_silme"  ) 
GROUP by 1
Order by 2, 6, 1, 3
;    
SELECT NOW();
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.

Checking query status...