KM Wikidata export: Difference between revisions

From Inguma Wikibase
Line 153: Line 153:
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>
PREFIX ipq: <https://wikibase.inguma.eus/prop/qualifier/>


select distinct ?artikulua ?wd ?inguma ?title ?data (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
select distinct ?artikulua ?wd ?p1guid ?inguma ?title ?data (group_concat(distinct concat('"',?sordinal,'": "',?wd_egilea,'"'); SEPARATOR=", ") as ?wd_egileak)
?issue ?sp ?ep ?doi ?ojs_landing ?wd_upload
?issue ?sp ?ep ?doi ?ojs_landing ?pdf ?wd_upload (strafter(str(?ref),"http://www.wikidata.org/reference/") as ?reference)
where {
where {
    
    
Line 163: Line 163:
   optional {?artikulua idp:P20 ?doi.}
   optional {?artikulua idp:P20 ?doi.}
   ?egilea idp:P1 ?wd_egilea.
   ?egilea idp:P1 ?wd_egilea.
   optional {?artikulua idp:P1 ?wd. bind(iri(concat(str(wd:),?wd)) as ?wikidata_item)
   optional {?artikulua ip:P1 ?p1guid. ?p1guid ips:P1 ?wd. bind(iri(concat(str(wd:),?wd)) as ?wikidata_item)
            optional {
           SERVICE <https://query.wikidata.org/sparql> {
           SERVICE <https://query.wikidata.org/sparql> {
           select ?wikidata_item ?wd_upload where {?wikidata_item p:P31 [ps:P31 wd:Q13442814; prov:wasDerivedFrom [pr:P248 wd:Q12259621; pr:P813 ?wd_upload]].}
           select ?wikidata_item ?wd_upload ?ref where {?wikidata_item p:P31 [ps:P31 wd:Q13442814; prov:wasDerivedFrom ?ref]. ?ref pr:P248 wd:Q12259621; pr:P813 ?wd_upload.}
     }
     }
          }
          }
            }
   optional {?artikulua idp:P12 ?inguma.}
   optional {?artikulua idp:P12 ?inguma.}
   ?artikulua idp:P26 ?issue.
   ?artikulua idp:P26 ?issue.
Line 173: Line 175:
   optional {?artikulua idp:P28 ?ep.}
   optional {?artikulua idp:P28 ?ep.}
   ?artikulua idp:P24 ?ojs_landing.
   ?artikulua idp:P24 ?ojs_landing.
  ?artikulua idp:P48 ?pdf.
    
    
}   
}   
group by ?artikulua ?wd ?inguma ?title ?data ?wd_egileak ?issue ?sp ?ep ?doi ?ojs_landing ?wd_upload
group by ?artikulua ?wd ?p1guid ?inguma ?title ?data ?wd_egileak ?issue ?sp ?ep ?doi ?ojs_landing ?pdf ?wd_upload ?ref
</sparql>
</sparql>


Bureaucrats, emailconfirmed, Administrators
58,048

edits