root > WikiSense-trunk > tools > BLU-User.sql

BLU-User.sql

text/plain, 554 bytes (load raw)
select * from image 
join page on page_namespace = 6 and page_title = img_name 
where img_user_text = "Uwe Koehne" 
and exists (
	select * from categorylinks 
	where cl_from = page_id 
	and cl_to in ("Wikipedia:BLU-User-Bilder_vom_25._Dezember_2006", 
		"Wikipedia:BLU-User-Bilder_vom_26._Dezember_2006", 
		"Wikipedia:BLU-User-Bilder_vom_27._Dezember_2006")
	)

-- using a subquery, because the amount of images uploaded by one user
-- is usually relatively small, and joining with categorylinks tends to be
-- expensive. Should be benchmarked, though.