Fork of
wf
by Mr. Ibrahem
This query is marked as a draft
This query has been published
by Mr. Ibrahem.
SQL
x
USE wikidatawiki_p;
SELECT * #CONCAT('Q', term_entity_id, '') AS id, term_text
from wb_terms , pagelinks#, wb_items_per_site
#WHERE term_entity_id = ips_item_id
#AND ips_site_id = 'arwiki'
WHERE term_entity_type = 'item'
/*
AND pl_from = term_entity_id
AND pl_namespace = 0
AND pl_title = 'Q5'*/
and term_entity_id in (SELECT pl_from FROM pagelinks where pl_namespace = 0 and pl_title = "Q11266439")
and term_entity_id in (SELECT pl_from FROM pagelinks where pl_namespace = 120 and pl_title = "P31")
# term_entity_id AND pl_namespace = 0 AND pl_title = 'Q5'
#AND ips_site_page IS NULL
AND term_language = 'ar'
AND term_type = 'label'
and term_text like "قالب:%"
#ORDER BY term_entity_id
GROUP BY term_entity_id
limit 10;
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.