KM Wikidata export: Difference between revisions

Line 113: Line 113:


select distinct ?oocc_item ?title (lang(?title) as ?title_lang) ?wd_lang (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 (count(?citing) as ?citations) (min(?old_date) as ?data) ?wd_container ?oocc_wd
?pag ?oocc (count(?citing) as ?citations) (min(xsd:integer(?regexdata)) as ?data) ?wd_container ?oocc_wd
where {
where {
    
    


   ?oocc_item idp:P42 ?oocc.
   ?oocc_item idp:P42 ?oocc.
  ?oocc_item ip:P89 ?oocc_st.
  ?oocc_st ips:P89 ?oocc_id.
  ?oocc_st ipq:P75 ?oocc_text.
  bind(replace(?oocc_text, "(.*)(19[0-9][0-9])(.*)", "$2") as ?regexdata)
   ?km_item idp:P88* ?oocc_item.
   ?km_item idp:P88* ?oocc_item.
   ?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 ?wd_container.
   ?oocc idp:P1 ?wd_container.
   ?oocc_item idp:P19 ?data; ip:P17 ?creator_st.  
   ?oocc_item 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.}  
Bureaucrats, emailconfirmed, Administrators
56,015

edits