Ziterauzi KM: Difference between revisions

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


select ?oocc_item ?oocc_id ?oocc_title ?oocc_text ?jatorrizkoa (year(?jat_data) as ?jat_urtea)
select ?oocc_item ?oocc_id ?oocc_title (group_concat(?lehen_arg) as ?lehen_argi) ?oocc_text ?jatorrizkoa (year(?jat_data) as ?jat_urtea)
where {
where {
   ?oocc_item ip:P89 ?oocc_st.
   ?oocc_item ip:P89 ?oocc_st.
   ?oocc_st ips:P89 ?oocc_id.
   ?oocc_st ips:P89 ?oocc_id.
   ?oocc_st ipq:P75 ?oocc_text.
   ?oocc_st ipq:P75 ?oocc_text.
  bind(replace(?oocc_text, "(.*)(19[0-9][0-9])(.*)", "$2") as ?lehen_arg)
   ?oocc_item idp:P10 ?oocc_title.
   ?oocc_item idp:P10 ?oocc_title.
   optional {
   optional {
Line 42: Line 43:
     ?jatorrizkoa idp:P19 ?jat_data.
     ?jatorrizkoa idp:P19 ?jat_data.
  }
  }
  }   order by xsd:integer(?oocc_id)
  }
 
group by ?oocc_item ?oocc_id ?oocc_title ?lehen_argi ?oocc_text ?jatorrizkoa ?jat_data
order by xsd:integer(?oocc_id)
</sparql>
</sparql>


Bureaucrats, emailconfirmed, Administrators
58,048

edits