Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
MGA73
.
Toggle Highlighting
SQL
SELECT page_title, COUNT(DISTINCT tl_target_id) as transclusion_count FROM templatelinks JOIN page ON tl_from = page_id WHERE tl_from_namespace = 6 AND tl_target_id = (SELECT lt_id FROM linktarget JOIN page ON lt_title = page_title AND lt_namespace = page_namespace WHERE page_namespace = 10 AND page_title = 'GFDL') GROUP BY tl_from; #SELECT page_title, COUNT(DISTINCT tl_id) as transclusion_count #FROM templatelinks #JOIN page ON tl_from = page_id #WHERE tl_from_namespace = 6 #AND tl_target_id = (SELECT lt_id FROM linktarget JOIN page ON lt_title = page_title AND lt_namespace = page_namespace WHERE page_namespace = 10 AND page_title = 'GFDL') #GROUP BY tl_from; #SELECT page_title, COUNT(*) as transclusion_count #FROM templatelinks #JOIN page ON tl_from = page_id #WHERE tl_from_namespace = 6 #AND tl_target_id = (SELECT lt_id FROM linktarget JOIN page ON lt_title = page_title AND lt_namespace = page_namespace WHERE page_namespace = 10 AND page_title = 'GFDL') #GROUP BY tl_from; ##SELECT page_title ##FROM templatelinks ##JOIN page ON tl_from = page_id ##WHERE tl_from_namespace = 6 ##AND tl_target_id = (SELECT lt_id FROM linktarget ## JOIN page ON lt_title = page_title ## AND lt_namespace = page_namespace ## WHERE page_namespace = 10 ## AND page_title = 'GFDL') ##GROUP BY tl_from ##HAVING COUNT(*) > 0; ### #SELECT CONCAT("File:", page_title)#, lt_id #FROM pagelinks #JOIN page ON pl_from = page_id #WHERE pl_from_namespace = 6 #AND pl_namespace = 10 #AND pl_title = 'GFDL' #; #JOIN linktarget on tl_target_id = page_id #JOIN actor_image ON img_actor = actor_id #JOIN page ON tl_from = page_id #JOIN linktarget on tl_target_id = lt_id #; #AND tl_target_id = (SELECT lt_id FROM linktarget WHERE lt_title = 'GFDL'); #AND lt_title = 'GFDL' #GROUP BY page_title #HAVING COUNT(*) > 1; ### #SELECT # page_title, # COUNT(*) AS count #FROM templatelinks #JOIN page ON tl_from = page_id #WHERE tl_from_namespace = 10 #Where page_namespace = 6 #GROUP BY page_title #HAVING count > 0;
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...