KM Wikidata export: Difference between revisions

Line 221: Line 221:
</sparql>
</sparql>
= Export citations (for citation-to-wikidata.py) =
= Export citations (for citation-to-wikidata.py) =
Galdeketa honek Wikidatan oraindik idatzi ez diren aipu-erlazioak zerrendatzen ditu.
Galdeketa honek Wikidatan oraindik idatzi ez diren aipu-erlazioak zerrendatzen ditu:
<sparql tryit="1">
<sparql tryit="1">
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
PREFIX iwb: <https://wikibase.inguma.eus/entity/>
Line 249: Line 249:
}   
}   
group by ?aipatzen_duena ?aipatzen_duenaLabel ?egileak ?data ?aldizkariaLabel ?oocc_item ?oocc_id ?oocc_title ?wd_cit_iturri ?wd_cit_xede
group by ?aipatzen_duena ?aipatzen_duenaLabel ?egileak ?data ?aldizkariaLabel ?oocc_item ?oocc_id ?oocc_title ?wd_cit_iturri ?wd_cit_xede
order by ?aipatzen_duena
</sparql>
Galdeketa honek Wikidatan zitazioak noiz idatzi ditugun erakusten du:
<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 distinct ?aipatzen_duena ?aipatzen_duenaLabel (group_concat(?egileaLabel; SEPARATOR=", ") as ?egileak) (year(?data) as ?urtea) ?aldizkariaLabel ?oocc_item ?oocc_title ?wd_cit_iturri ?wd_cit_xede ?wikidata_upload
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.
  ?oocc_item idp:P1 ?wd_cit_xede.
 
  ?aipatzen_duena idp:P62 [idp:P88* ?oocc_item].
  ?aipatzen_duena idp:P19 ?data; idp:P37 ?aldizkaria; idp:P17 [rdfs:label ?egileaLabel]. filter(lang(?egileaLabel)="eu")
  ?aipatzen_duena idp:P1 ?wd_cit_iturri.
  bind(iri(concat(str(wd:),?wd_cit_iturri)) as ?wd_cit_iturri_item)
  bind(iri(concat(str(wd:),?wd_cit_xede)) as ?wd_cit_xede_item)
 
  SERVICE <https://query.wikidata.org/sparql> {
          select ?wd_cit_iturri_item ?wd_cit_xede_item ?wikidata_upload where {?wd_cit_iturri_item p:P2860 [ps:P2860 ?wd_cit_xede_item; prov:wasDerivedFrom [pr:P248 wd:Q12259621; pr:P813 ?wikidata_upload]]. } }
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,eu". }
group by ?aipatzen_duena ?aipatzen_duenaLabel ?egileak ?data ?aldizkariaLabel ?oocc_item ?oocc_id ?oocc_title ?wd_cit_iturri ?wd_cit_xede ?wikidata_upload
order by ?aipatzen_duena
order by ?aipatzen_duena
</sparql>
</sparql>
Bureaucrats, emailconfirmed, Administrators
58,048

edits