query-3fb1d5a2c7f2192e521b1cdc4db50ea9

rq turtle/ttl

LAS VEGAS PRIDE-EVENTS SELECT DISTINCT ?event ?eventLabel ?startTime ?endTime ?eventDescription ?eventPartsLabel ?pointInTime ?locationLabel ?location ?geoNames_uri ?coordinate WHERE { { ?event wdt:P5008 wd:Q100202113 . ?event wdt:P31 ?instanceOf ; wdt:P31 wd:Q51404 . OPTIONAL{?event wdt:P580 ?startTime } . OPTIONAL{?event wdt:P582 ?endTime } . ?event p:P527 ?hasPart . ?hasPart ps:P527 ?eventParts . ?hasPart pq:P585 ?pointInTime . ?hasPart pq:P276 ?location . OPTIONAL {?location wdt:P1566 ?geoNamesID } . OPTIONAL {?location wdt:P625 ?coordinate } . BIND(URI(CONCAT("https://sws.geonames.org/", ?geoNamesID)) AS ?geoNames_uri) }SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }ORDER BY ASC (?pointInTime)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
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#>
#LAS VEGAS PRIDE-EVENTS
SELECT DISTINCT ?event ?eventLabel ?startTime ?endTime ?eventDescription ?eventPartsLabel ?pointInTime ?locationLabel ?location ?geoNames_uri ?coordinate
WHERE
{
 {
  ?event wdt:P5008 wd:Q100202113 .
  ?event wdt:P31 ?instanceOf ; wdt:P31 wd:Q51404 .
  OPTIONAL{?event wdt:P580 ?startTime } .
  OPTIONAL{?event wdt:P582 ?endTime } . 
  ?event p:P527 ?hasPart  .
  ?hasPart ps:P527 ?eventParts .
  ?hasPart pq:P585 ?pointInTime .
  ?hasPart pq:P276 ?location .
  OPTIONAL {?location wdt:P1566 ?geoNamesID } .
  OPTIONAL {?location wdt:P625 ?coordinate } . 
  BIND(URI(CONCAT("https://sws.geonames.org/", ?geoNamesID)) AS ?geoNames_uri)
 }SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}ORDER BY ASC (?pointInTime)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?coordinate"):::projected v5("?endTime"):::projected v2("?event"):::projected v7("?eventParts") v9("?geoNamesID") v11("?geoNames_uri"):::projected v6("?hasPart") v3("?instanceOf") v8("?location"):::projected v1("?pointInTime"):::projected v4("?startTime"):::projected c16(["en"]):::literal c2(["wd:Q100202113"]):::iri c14(["bd:serviceParam"]):::iri c4(["wd:Q51404"]):::iri v2 --"p:direct/P5008"--> c2 v2 --"p:direct/P31"--> v3 v2 --"p:direct/P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P580".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P582".-> v5 end v2 --"p:P527"--> v6 v6 --"p:statement/P527"--> v7 v6 --"p:qualifier/P585"--> v1 v6 --"p:qualifier/P276"--> v8 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v8 -."p:direct/P1566".-> v9 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v8 -."p:direct/P625".-> v10 end bind0[/"concat('https://sws.geonames.org/',?geoNamesID)"/] v9 --o bind0 bind0 --as--o v11 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end