query-d107607c8c3d7f6dfdd864ead24d0bcc

rq turtle/ttl

Magne

Use at

PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?tittel ?vitenskapelig_navn ?artikkel
WHERE
{
  SERVICE wikibase:mwapi
  {
    bd:serviceParam wikibase:endpoint "no.wikipedia.org" .
    bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam mwapi:generator "search" .
    bd:serviceParam mwapi:gsrsearch 'hastemplate:"Taksoboks" insource:"rødlistestatusno Rødliste VU no"' .
     # Note that inline search ignores "greyspace", so the search will match "rødlistestatusno={{Rødliste|VU|no}}"
    bd:serviceParam mwapi:gsrlimit "max" .
    bd:serviceParam mwapi:gsrnamespace "0" .
    ?tittel wikibase:apiOutput mwapi:title .
    ?item wikibase:apiOutputItem mwapi:item .
  }
  FILTER BOUND(?item)
  OPTIONAL { ?item wdt:P225 ?vitenskapelig_navn }
  ?artikkel schema:about ?item .
  ?artikkel schema:isPartOf <https://no.wikipedia.org/> .
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?artikkel"):::projected v1("?item"):::projected v2("?tittel"):::projected v3("?vitenskapelig_navn"):::projected c18(["mwapi:item"]):::iri c10(["hastemplate:"Taksoboks" insource:"rødlistestatusno Rødliste VU no""]):::literal c12(["max"]):::literal c14(["0"]):::literal c8(["search"]):::literal c2(["bd:serviceParam"]):::iri c22([https://no.wikipedia.org/]):::iri c4(["no.wikipedia.org"]):::literal c16(["mwapi:title"]):::iri c6(["Generator"]):::literal f0[["bound(?item)"]] f0 --> v1 subgraph s1["http://wikiba.se/ontology#mwapi"] style s1 stroke-width:4px; c2 --"mwapi:endpoint"--> c4 c2 --"mwapi:api"--> c6 c2 --"mwapi:generator"--> c8 c2 --"mwapi:gsrsearch"--> c10 c2 --"mwapi:gsrlimit"--> c12 c2 --"mwapi:gsrnamespace"--> c14 v2 --"mwapi:apiOutput"--> c16 v1 --"mwapi:apiOutputItem"--> c18 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P225".-> v3 end v4 --"schema:about"--> v1 v4 --"schema:isPartOf"--> c22