The query is
select cl_from, page_id, cl_type from categorylinks,page where cl_type!="page" and page_namespace=14 and page_title=cl_to order by page_id;
It is performed commonswiki_p on commonswiki.labsdb (alias for s4.analytics.db.svc.eqiad.wmflabs).
The expected result size is >300 million rows:
MariaDB [commonswiki_p]> select count(*) from categorylinks,page where cl_type!="page" and page_namespace=14 and page_title=cl_to; +-----------+ | count(*) | +-----------+ | 332109988 | +-----------+ 1 row in set (21 min 14.25 sec)