KM Wikidata export: Difference between revisions

Line 142: Line 142:
group by ?oocc_item ?title ?wd_lang ?wd_egileak ?pag ?oocc  ?citations ?data ?wd_container ?oocc_wd
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>
= Export citations (for citation-to-wikidata.py) =
<sparql tryit="1">
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX idp: <https://wikibase.inguma.eus/prop/direct/>
PREFIX ip: <https://wikibase.inguma.eus/prop/>
PREFIX ips: <https://wikibase.inguma.eus/prop/statement/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
select ?aipatzen_duena ?aipatzen_duenaLabel (group_concat(?egileaLabel) as ?egileak) (year(?data) as ?urtea) ?oocc_item ?oocc_id ?oocc_title ?wd_cit_iturri ?wd_cit_xede
where {
  ?oocc_item ip:P89 ?oocc_st.
  ?oocc_st ips:P89 ?oocc_id.
  ?oocc_st ipq:P75 ?oocc_text.
  ?oocc_item idp:P10 ?oocc_title.
 
  optional {?aipatzen_duena idp:P1 ?wd_cit_iturri.}
  optional {?oocc_item idp:P1 ?wd_cit_xede.}
 
  ?aipatzen_duena idp:P62 [idp:P88* ?oocc_item].
 
  ?aipatzen_duena idp:P19 ?data; idp:P17 [rdfs:label ?egileaLabel]. filter(lang(?egileaLabel)="eu")
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,eu". }
group by ?aipatzen_duena ?aipatzen_duenaLabel ?egileak ?data ?oocc_item ?oocc_id ?oocc_title ?wd_cit_iturri ?wd_cit_xede
order by xsd:integer(?oocc_id)
</sparql>
</sparql>
Bureaucrats, emailconfirmed, Administrators
56,015

edits