query-700338ebd1433399641e1af920efea20
Queries
Use at
- https://query.wikidata.org/sparql
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT DISTINCT ?item ?itemLabel ?super
WHERE
{
VALUES ?class { wd:Q47154513 wd:Q72044356 wd:Q17339814 wd:Q72070508 wd:Q59199015 wd:Q15711994 wd:Q56256086 }
VALUES ?refs { wd:Q902163 wd:Q47154604 wd:Q107414074 wd:Q107422103 wd:Q3343212 wd:Q45859849 }
?item p:P31 ?stmt.
?stmt ps:P31 ?class.
?stmt prov:wasDerivedFrom ?refnode.
{ ?refnode pr:P248 ?refs. }
UNION
{ ?refnode pr:P887 wd:Q84423633. }
VALUES ?refs2 { wd:Q902163 wd:Q47154604 wd:Q107414074 wd:Q107422103 wd:Q3343212 wd:Q45859849 }
?item p:P279 ?stmt2.
?stmt2 ps:P279 ?super.
?stmt2 prov:wasDerivedFrom ?refnode2.
{ ?refnode2 pr:P248 ?refs2. }
UNION
{ ?refnode2 pr:P887 wd:Q84423633. }
?item rdfs:label ?itemLabel.
FILTER(LANG(?itemLabel) = "en")
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?class")
v4("?item"):::projected
v1("?itemLabel"):::projected
v6("?refnode")
v10("?refnode2")
v3("?refs")
v7("?refs2")
v5("?stmt")
v8("?stmt2")
v9("?super"):::projected
c7(["wd:Q84423633"]):::iri
f0[["?itemLabel = 'en'"]]
f0 --> v1
bind1[/VALUES ?class/]
bind1-->v2
bind10(["wd:Q47154513"])
bind10 --> bind1
bind11(["wd:Q72044356"])
bind11 --> bind1
bind12(["wd:Q17339814"])
bind12 --> bind1
bind13(["wd:Q72070508"])
bind13 --> bind1
bind14(["wd:Q59199015"])
bind14 --> bind1
bind15(["wd:Q15711994"])
bind15 --> bind1
bind16(["wd:Q56256086"])
bind16 --> bind1
bind2[/VALUES ?refs/]
bind2-->v3
bind20(["wd:Q902163"])
bind20 --> bind2
bind21(["wd:Q47154604"])
bind21 --> bind2
bind22(["wd:Q107414074"])
bind22 --> bind2
bind23(["wd:Q107422103"])
bind23 --> bind2
bind24(["wd:Q3343212"])
bind24 --> bind2
bind25(["wd:Q45859849"])
bind25 --> bind2
v4 --"p:P31"--> v5
v5 --"p:statement/P31"--> v2
v5 --"prov:wasDerivedFrom"--> v6
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v6 --"p:reference/P887"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v6 --"p:reference/P248"--> v3
end
union0r <== or ==> union0l
end
bind3[/VALUES ?refs2/]
bind3-->v7
bind30(["wd:Q902163"])
bind30 --> bind3
bind31(["wd:Q47154604"])
bind31 --> bind3
bind32(["wd:Q107414074"])
bind32 --> bind3
bind33(["wd:Q107422103"])
bind33 --> bind3
bind34(["wd:Q3343212"])
bind34 --> bind3
bind35(["wd:Q45859849"])
bind35 --> bind3
v4 --"p:P279"--> v8
v8 --"p:statement/P279"--> v9
v8 --"prov:wasDerivedFrom"--> v10
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
v10 --"p:reference/P887"--> c7
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v10 --"p:reference/P248"--> v7
end
union1r <== or ==> union1l
end
v4 --"rdfs:label"--> v1