User:Gmaxwell/image templates

From Wikipedia, the free encyclopedia
mysql> select concat('*{{',tl_title,'}}'), count(distinct page.page_id) as cc from page join templatelinks on tl_from=page.page_id join page as p2 on (p2.page_namespace=10 and p2.page_title=tl_title) where page.page_namespace=6 and tl_namespace=10 and (tl_title not like 'Non-free%' and tl_title not like 'GFDL%' and tl_title not like 'Cc%' and tl_title not like 'PD%' and tl_title not like 'Pd%') and not exists (select 1 from templatelinks where tl_from=p2.page_id and tl_title='Non-free_media' and tl_namespace=10 limit 1) group by tl_title order by cc desc;
+--------------------------------------------------------------------+--------+
| concat('*{{tl|',tl_title,'}}') | cc |
+--------------------------------------------------------------------+--------+
|

+--------------------------------------------------------------------+--------+ 1226 rows in set (1 min 22.86 sec)