This query is marked as a draft This query has been published by Ankry.

SQL

x
 
use pawikisource_p;
/*select * from wbc_entity_usage;*/
SELECT eu_entity_id,page_title FROM wbc_entity_usage JOIN page ON eu_page_id=page_id WHERE page_namespace=0 AND eu_aspect='S';
SELECT COUNT(DISTINCT page_title) AS 'number of pages linked to Wikidata as sitelinks' FROM wbc_entity_usage JOIN page ON eu_page_id=page_id WHERE page_namespace=0 AND eu_aspect='S';
SELECT COUNT(DISTINCT page_title) AS 'number of pages not linked to Wikidata as sitelinks'
FROM (SELECT page_title FROM page 
      WHERE page_namespace=0 AND page_is_redirect=0 AND page_title NOT IN (SELECT page_title
                                                                           FROM wbc_entity_usage JOIN page ON eu_page_id=page_id
                                                                           WHERE page_namespace=0 AND eu_aspect='S')) AS B;
SELECT page_title FROM page 
      WHERE page_namespace=0 AND page_is_redirect=0;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.

Checking query status...