query-0bd9cb25da96d280f5e29bde3f6d749a

rq turtle/ttl

Massachusetts venue map query can then be inferred from that. (Q771)Massachusetts , since (P131)located in the administrative territorial entity . I've been adding venues using the more specific city or neighborhood in which they're located as (Q771)Massachusetts (P131)located in the administrative territorial entity and (Q8719053)music venue (P31)instance of in the main page, which only retrieves items with the exact the one currently linked toDon't want to step on any toes here, but this might be a better query for getting music venues in Massachusetts than

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map

SELECT ?music_venue ?music_venueLabel ?coords
(group_concat(distinct ?locationLabel; separator="; ") as ?locations) 
WHERE {

    ?music_venue wdt:P131+ wd:Q771;
          wdt:P31/wdt:P279* wd:Q8719053;
          wdt:P131 ?location.
    OPTIONAL{?music_venue wdt:P625 ?coords}
    SERVICE wikibase:label { 
        bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
        ?location rdfs:label ?locationLabel.
        ?music_venue rdfs:label ?music_venueLabel.}
} group by ?music_venue ?music_venueLabel ?coords

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?coords"):::projected v2("?location") v4("?locationLabel"):::projected v6("?locations") v1("?music_venue"):::projected v5("?music_venueLabel"):::projected a1((" ")) c8(["bd:serviceParam"]):::iri c5(["wd:Q8719053"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q771"]):::iri v1 --"wdt:P131"--> c2 v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c5 v1 --"wdt:P131"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P625".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 v2 --"rdfs:label"--> v4 v1 --"rdfs:label"--> v5 end bind1[/"?locationLabel"/] v4 --o bind1 bind1 --as--o v6