Guest User

Untitled

a guest
Nov 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.58 KB | None | 0 0
  1. SELECT CONCAT("[[User:", pl_title, "]]"), CONCAT("[[Wikipedia:", page_title, "]]"), COUNT(*) AS "Classes"
  2. FROM categorylinks
  3. JOIN page      ON page_id=cl_from
  4. JOIN pagelinks ON pl_from=page_id
  5.  
  6. WHERE cl_to="United_States_Education_Program_courses,_2011_Q3"
  7. AND page_namespace=4 /* Wikipedia: */
  8. AND page.page_title NOT IN (
  9.   "Wikipedia:United_States_Education_Program/Courses",
  10.   "Wikipedia:United_States_Education_Program/Courses/2011_Q3")
  11.  
  12. /* links to user pages */
  13. AND pl_namespace=2 /* User: */
  14. AND pl_title NOT LIKE "%/%"
  15. AND pl_title!="Example_User"
  16.  
  17. GROUP BY page_title;
Add Comment
Please, Sign In to add comment