KM Wikidata export: Difference between revisions

Line 112: Line 112:
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>


select distinct ?oocc_item ?title (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
select distinct ?oocc_item ?title (lang(?title) as ?title_lang) ?wd_lang (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
?pag ?oocc ?oocc_wd (count(?citing) as ?citations) (min(?old_date) as ?data) ?wd_container
?pag ?oocc (count(?citing) as ?citations) (min(?old_date) as ?data) ?wd_container ?oocc_wd
where { # values ?oocc { iwb:Q40479 iwb:Q40483 iwb:Q40482 iwb:Q40474 iwb:Q40484 iwb:Q40481 iwb:Q40480 iwb:Q40485 iwb:Q40473 iwb:Q40478 iwb:Q40472 iwb:Q40471 iwb:Q40476 iwb:Q40477 }
where {
    
    


Line 121: Line 121:
   ?citing idp:P62 ?km_item.
   ?citing idp:P62 ?km_item.
   ?km_item idp:P19 ?old_date.
   ?km_item idp:P19 ?old_date.
   ?oocc idp:P1 ?oocc_wd.
   ?oocc idp:P1 ?wd_container.
   ?oocc_item idp:P19 ?data; ip:P17 ?creator_st.  
   ?oocc_item idp:P19 ?data; ip:P17 ?creator_st.  
   optional {?creator_st ips:P17 ?egilea.}  
   optional {?creator_st ips:P17 ?egilea.}  
   optional {?creator_st ipq:P36 ?sordinal.}  
   optional {?creator_st ipq:P36 ?sordinal.}  
   ?oocc_item idp:P10 ?title.
   ?oocc_item idp:P10 ?title.
   ?oocc_item idp:P42 [idp:P1 ?wd_container].
   ?oocc_item idp:P16 [idp:P1 ?wd_lang].
 
   
   ?egilea idp:P1 ?wd_egilea.
   ?egilea idp:P1 ?wd_egilea.
   # filter not exists {?oocc_item idp:P1 ?wd.}
   # filter not exists {?oocc_item idp:P1 ?wd.}
Line 133: Line 133:
   optional {?oocc_item idp:P26 ?issue.}
   optional {?oocc_item idp:P26 ?issue.}
   optional {?oocc_item idp:P80 ?pag.}
   optional {?oocc_item idp:P80 ?pag.}
  optional {?oocc_item idp:P1 ?oocc_wd.}
   
   
}
}
group by ?oocc_item ?title ?wd_egileak ?pag ?oocc ?oocc_wd ?citations ?data ?wd_container
group by ?oocc_item ?title ?wd_lang ?wd_egileak ?pag ?oocc ?citations ?data ?wd_container ?oocc_wd
order by desc(?citations)
order by desc(?citations)
</sparql>
</sparql>
Bureaucrats, emailconfirmed, Administrators
56,015

edits