Fork of Files on ms.wiki NOT in spec categories by MGA73
This query is marked as a draft This query has been published by MGA73.

SQL

AخA
 
#USE ukwiki_p;
SELECT
 CONCAT("# [[:File:", img_name, "]]") AS file, CONCAT("[[:User:", actor_name, "]]") as uploader
FROM templatelinks
JOIN page ON tl_from = page_id
JOIN image ON img_name = page_title AND page_namespace = 6
JOIN actor_image ON img_actor = actor_id
AND page_is_redirect=0 
AND NOT EXISTS(
SELECT * FROM categorylinks 
WHERE page_id=cl_from 
AND (cl_to="Вільні_файли" 
OR cl_to= "Файли_без_ліцензії"# Files_without_a_license
OR cl_to= "Невільні_файли"
OR cl_to= "All_free_in_US_media" 
    ))
GROUP BY img_name 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.

Checking query status...