query-cabceddfc57cce7702e3d0fd794130c3
historical societies in Massachusetts, US
SELECT ?item ?itemLabel ?official_website ?YouTube_channel_ID ?Twitter_username ?Facebook_ID ?online_catalog ?inception WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?item wdt:P31 wd:Q5774403; wdt:P131 wd:Q771. OPTIONAL { ?item wdt:P856 ?official_website. } OPTIONAL { ?item wdt:P2397 ?YouTube_channel_ID. } OPTIONAL { ?item wdt:P2002 ?Twitter_username. } OPTIONAL { ?item wdt:P2013 ?Facebook_ID. } OPTIONAL { ?item wdt:P8768 ?online_catalog. } OPTIONAL { ?item wdt:P571 ?inception. } } ORDER BY (?itemLabel)
Use at
- https://query.wikidata.org/sparql
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#>
# historical societies in Massachusetts, US
SELECT ?item ?itemLabel ?official_website ?YouTube_channel_ID ?Twitter_username ?Facebook_ID ?online_catalog ?inception WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item wdt:P31 wd:Q5774403;
wdt:P131 wd:Q771.
OPTIONAL { ?item wdt:P856 ?official_website. }
OPTIONAL { ?item wdt:P2397 ?YouTube_channel_ID. }
OPTIONAL { ?item wdt:P2002 ?Twitter_username. }
OPTIONAL { ?item wdt:P2013 ?Facebook_ID. }
OPTIONAL { ?item wdt:P8768 ?online_catalog. }
OPTIONAL { ?item wdt:P571 ?inception. }
}
ORDER BY (?itemLabel)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?Facebook_ID"):::projected
v5("?Twitter_username"):::projected
v4("?YouTube_channel_ID"):::projected
v8("?inception"):::projected
v2("?item"):::projected
v1("?itemLabel"):::projected
v3("?official_website"):::projected
v7("?online_catalog"):::projected
c2(["bd:serviceParam"]):::iri
c6(["wd:Q5774403"]):::iri
c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c8(["wd:Q771"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v2 --"wdt:P31"--> c6
v2 --"wdt:P131"--> c8
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P856".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2397".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2002".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P2013".-> v6
end
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P8768".-> v7
end
subgraph optional5["(optional)"]
style optional5 fill:#bbf,stroke-dasharray: 5 5;
v2 -."wdt:P571".-> v8
end