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
Fabian.braesemann
.
Toggle Highlighting
SQL
#!/bin/bash WIKIS=$(mysql -BN -h sql -e 'SELECT dbname FROM toolserver.wiki WHERE domain IS NOT NULL AND is_closed = 0;') for dbname in $WIKIS; do echo $dbname echo " /* SLOW_OK */ SELECT CONCAT(ns_name, ':', page_title), el_to FROM externallinks JOIN page ON el_from = page_id JOIN toolserver.namespacename ON dbname = '$dbname' AND ns_is_favorite AND ns_id = page_namespace WHERE el_to LIKE '$1%' -- " | mysql -h ${dbname/_/-}.rrdb.toolserver.org -BcN $dbname # mysql switches # -c Prevent comment stripping, need to prevent the query killer # -N No column name heading # -B Bare formatted / -t Table formatted / -H HTML output / -X XML output done;
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...