query-dd458dab555fc1ebcec6cf8ea83f4c74
title:Politiska vildar SELECT ?vilde ?vildeLabel ?partiLabel (MIN(?_start) AS ?start) (MAX(?_slut) AS ?slut) WHERE { ?vilde p:P39 ?bef_node. ?bef_node ps:P39 wd:Q10655178; a wdno:P4100; pq:P2937 ?mandp. OPTIONAL {?bef_node pq:P580 ?_start} OPTIONAL {?bef_node pq:P582 ?_slut} ?vilde p:P39 [pq:P2937 ?mandp; pq:P4100 ?parti]. SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". } } GROUP BY ?vilde ?vildeLabel ?partiLabel ?mandp ORDER BY ?start
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdno: <http://www.wikidata.org/prop/novalue/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title:Politiska vildar
SELECT ?vilde ?vildeLabel ?partiLabel (MIN(?_start) AS ?start) (MAX(?_slut) AS ?slut) WHERE {
?vilde p:P39 ?bef_node.
?bef_node ps:P39 wd:Q10655178;
a wdno:P4100;
pq:P2937 ?mandp.
OPTIONAL {?bef_node pq:P580 ?_start}
OPTIONAL {?bef_node pq:P582 ?_slut}
?vilde p:P39 [pq:P2937 ?mandp; pq:P4100 ?parti].
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}
GROUP BY ?vilde ?vildeLabel ?partiLabel ?mandp
ORDER BY ?start
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?_slut"):::projected
v5("?_start"):::projected
v3("?bef_node")
v4("?mandp")
v7("?parti")
v8("?slut")
v8("?start")
v2("?vilde"):::projected
a1((" "))
c3(["wd:Q10655178"]):::iri
c11(["bd:serviceParam"]):::iri
c13(["sv,en"]):::literal
c5(["p:novalue/P4100"]):::iri
v2 --"p:P39"--> v3
v3 --"p:statement/P39"--> c3
v3 --"a"--> c5
v3 --"p:qualifier/P2937"--> v4
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P580".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:qualifier/P582".-> v6
end
a1 --"p:qualifier/P2937"--> v4
a1 --"p:qualifier/P4100"--> v7
v2 --"p:P39"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind2[/"min(?_start)"/]
v5 --o bind2
bind2 --as--o v8
bind3[/"max(?_slut)"/]
v6 --o bind3
bind3 --as--o v8