This query is marked as a draft This query has been published by Matěj Suchánek.

SQL

AخA
 
SELECT eu_entity_id, IF(GROUP_CONCAT(DISTINCT eu_aspect SEPARATOR ',') = 'L.sk', 'sk', 'en') AS aspect, COUNT(DISTINCT cl_from) AS amount
FROM wbc_entity_usage
JOIN categorylinks ON cl_from = eu_page_id
WHERE cl_to = 'Údržba:Doplnit_štítek_na_Wikidatech'
AND eu_aspect IN ('L.sk', 'L.en')
AND eu_entity_id LIKE 'Q%'
GROUP BY eu_entity_id
ORDER BY amount DESC, eu_entity_id
LIMIT 2000;
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...