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

SQL

x
 
/*use wikidatawiki_p; 
SELECT * from wb_terms 
WHERE #term_entity_id < 10
#AND 
term_entity_type = 'item'
AND term_language <> 'lv'
AND term_type = 'label'
limit 20;
--ir lvwiki saite; nav lv label
use wikidatawiki_p; 
select CONCAT("Q",ips_item_id), CONCAT("Llv"), CONCAT('"',ips_site_page,'"')
from wb_items_per_site i
join wb_terms on ips_item_id = term_entity_id and term_type = "label"
where i.ips_site_id='lvwiki' and i.ips_item_id not in
(select term_entity_id from wb_terms where ips_item_id = term_entity_id and term_type = "label" and term_language='lv')
group by ips_item_id
limit 1000;
use wikidatawiki_p; 
select CONCAT("Q",ips_item_id), CONCAT("Llv"), CONCAT('"',ips_site_page,'"')
from wb_items_per_site i
#join wb_terms on ips_item_id = term_entity_id and term_type = "label"
where i.ips_site_id='lvwiki' and i.ips_item_id not in
(select term_entity_id from wb_terms where# ips_item_id = term_entity_id and 
 term_type = "label" and term_language='lv')
group by ips_item_id
limit 1000;
use lvwiki_p;
select page_title, CONCAT("Kategorija:",page_title)
from page
where page_namespace=0 and page_is_redirect=0 and page_title in (select page_title
from page
where page_namespace=14 and page_is_redirect=0)
limit 10;
*/
use wikidatawiki_p; 
select CONCAT("Q",ips_item_id), CONCAT("Let"), CONCAT('"',ips_site_page,'"')
from wb_items_per_site i
#join wb_terms on ips_item_id = term_entity_id and term_type = "label"
where i.ips_site_id='etwiki' and i.ips_item_id not in
(select term_entity_id from wb_terms where# ips_item_id = term_entity_id and 
 term_type = "label" and term_language='et'
and term_entity_id=i.ips_item_id)
group by ips_item_id
limit 1000;
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...