query-d05fd26a0e645a08817d15bcb4a574f1
Propertiesinstance of (P31)
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel (group_concat(?orglikeLabel;SEPARATOR=";") as ?orgs)
{
SELECT ?item ?itemLabel ?orglikeLabel
WHERE {
VALUES (?orglike) { (wd:Q2467461) (wd:Q4671277) (wd:Q856234) (wd:Q166118)
(wd:Q167346) (wd:Q1143635) (wd:Q498162) (wd:Q13226383) (wd:Q180958)
(wd:Q6498663) (wd:Q2659904) (wd:Q181916) (wd:Q16917) (wd:Q1664720) (wd:Q615150)
(wd:Q1321960) (wd:Q28324850) (wd:Q4287745) (wd:Q494230) (wd:Q43229)
(wd:Q23002039) (wd:Q31855) (wd:Q3918) (wd:Q1384955) }
{
SELECT DISTINCT ?item ?orglike
WHERE {
{
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "search";
mwapi:gsrsearch "inlabel:university of California, davis"@en;
mwapi:gsrlimit "max".
?item wikibase:apiOutputItem mwapi:title. }
?item wdt:P31 ?orglike.
} UNION {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator";
mwapi:generator "search";
mwapi:gsrsearch "inlabel:UC Davis"@en;
mwapi:gsrlimit "max".
?item wikibase:apiOutputItem mwapi:title. }
?item wdt:P31 ?orglike.
} } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} } group by ?item ?itemLabel order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v1("?itemLabel"):::projected
v2("?orglike")
v4("?orglikeLabel"):::projected
v5("?orgs")
c4(["www.wikidata.org"]):::literal
c12(["max"]):::literal
c16([sinlabel:UC Davis^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal
c8(["search"]):::literal
c2(["bd:serviceParam"]):::iri
c10([sinlabel:university of California, davis^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#langString>"]):::literal
c19(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c14(["mwapi:title"]):::iri
c6(["Generator"]):::literal
bind0[/VALUES ?orglike/]
bind0-->v2
bind00(["wd:Q2467461"])
bind00 --> bind0
bind01(["wd:Q4671277"])
bind01 --> bind0
bind02(["wd:Q856234"])
bind02 --> bind0
bind03(["wd:Q166118"])
bind03 --> bind0
bind04(["wd:Q167346"])
bind04 --> bind0
bind05(["wd:Q1143635"])
bind05 --> bind0
bind06(["wd:Q498162"])
bind06 --> bind0
bind07(["wd:Q13226383"])
bind07 --> bind0
bind08(["wd:Q180958"])
bind08 --> bind0
bind09(["wd:Q6498663"])
bind09 --> bind0
bind010(["wd:Q2659904"])
bind010 --> bind0
bind011(["wd:Q181916"])
bind011 --> bind0
bind012(["wd:Q16917"])
bind012 --> bind0
bind013(["wd:Q1664720"])
bind013 --> bind0
bind014(["wd:Q615150"])
bind014 --> bind0
bind015(["wd:Q1321960"])
bind015 --> bind0
bind016(["wd:Q28324850"])
bind016 --> bind0
bind017(["wd:Q4287745"])
bind017 --> bind0
bind018(["wd:Q494230"])
bind018 --> bind0
bind019(["wd:Q43229"])
bind019 --> bind0
bind020(["wd:Q23002039"])
bind020 --> bind0
bind021(["wd:Q31855"])
bind021 --> bind0
bind022(["wd:Q3918"])
bind022 --> bind0
bind023(["wd:Q1384955"])
bind023 --> bind0
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
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"--> c16
c2 --"mwapi:gsrlimit"--> c12
v3 --"mwapi:apiOutputItem"--> c14
end
v3 --"wdt:P31"--> v2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
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
v3 --"mwapi:apiOutputItem"--> c14
end
v3 --"wdt:P31"--> v2
end
union0r <== or ==> union0l
end
subgraph s2["http://wikiba.se/ontology#label"]
style s2 stroke-width:4px;
c2 --"mwapi:language"--> c19
end
bind2[/"?orglikeLabel"/]
v4 --o bind2
bind2 --as--o v5