query-deea4d1e8ebd411fdff51e11832cfcef

rq turtle/ttl

Timeline of LGBTQ+ Businesses in Las Vegas

Use at

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#>
#defaultView:Timeline
SELECT DISTINCT  ?item ?itemLabel ?itemDescription ?ownedByLabel ?dateOfOpening ?dateOfClosure 
WHERE
{
 {VALUES (?itemType) {(wd:Q1043639)(wd:Q51167626)(wd:Q115628485)(wd:Q115689759)(wd:Q106634743)(wd:Q1531507)(wd:Q115777618)(wd:Q115769587)(wd:Q105321449)(wd:Q30324198)(wd:Q116167940)(wd:Q52815)(wd:Q116543473)(wd:Q116546701)(wd:Q116547044)} # -- ADD P31 VALUES HERE --
  ?item wdt:P31/wdt:P279* ?itemType .
  ?item wdt:P5008 wd:Q100202113 .
  OPTIONAL {?item wdt:P1619 ?dateOfOpening ; wdt:P3999 ?dateOfClosure  } .
  OPTIONAL {?item wdt:P127 ?ownedBy}.
 }
UNION
 {
  {VALUES (?itemType) {(wd:Q11707) (wd:Q30022)(wd:Q622425) }
   ?item wdt:P31/wdt:P279* ?itemType .
   ?item wdt:P5008 wd:Q100202113 .
   OPTIONAL {?item wdt:P1619 ?dateOfOpening ; wdt:P3999 ?dateOfClosure  } .
   OPTIONAL {?item wdt:P1552 wd:Q661717 ; wdt:P1552 ?hasQuality } .
   FILTER (!EXISTS {?West_Las_Vegas wdt:P276 wd:Q7985710})
  }
 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}ORDER BY ASC (?itemLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?West_Las_Vegas") v5("?dateOfClosure"):::projected v4("?dateOfOpening"):::projected v8("?hasQuality") v3("?item"):::projected v1("?itemLabel"):::projected v8("?itemType") v6("?ownedBy") a1((" ")) a2((" ")) c15(["en"]):::literal c4(["wd:Q100202113"]):::iri c9(["wd:Q7985710"]):::iri c13(["bd:serviceParam"]):::iri c11(["wd:Q661717"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P276"--> e0c2 e0v1("?West_Las_Vegas"):::projected e0c2(["wd:Q7985710"]):::iri end f0--EXISTS--> f0e0 f0 --> v7 f0 --> c8 f0 --> c9 v7 --"wdt:P276"--> c9 bind1[/VALUES ?itemType/] bind1-->v8 bind10(["wd:Q11707"]) bind10 --> bind1 bind11(["wd:Q30022"]) bind11 --> bind1 bind12(["wd:Q622425"]) bind12 --> bind1 v3 --"wdt:P31"--> a2 a2 --"wdt:P279"--> v8 v3 --"wdt:P5008"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1619".-> v4 v3 --"wdt:P3999"--> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1552".-> c11 v3 --"wdt:P1552"--> v8 end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind2[/VALUES ?itemType/] bind2-->v8 bind20(["wd:Q1043639"]) bind20 --> bind2 bind21(["wd:Q51167626"]) bind21 --> bind2 bind22(["wd:Q115628485"]) bind22 --> bind2 bind23(["wd:Q115689759"]) bind23 --> bind2 bind24(["wd:Q106634743"]) bind24 --> bind2 bind25(["wd:Q1531507"]) bind25 --> bind2 bind26(["wd:Q115777618"]) bind26 --> bind2 bind27(["wd:Q115769587"]) bind27 --> bind2 bind28(["wd:Q105321449"]) bind28 --> bind2 bind29(["wd:Q30324198"]) bind29 --> bind2 bind210(["wd:Q116167940"]) bind210 --> bind2 bind211(["wd:Q52815"]) bind211 --> bind2 bind212(["wd:Q116543473"]) bind212 --> bind2 bind213(["wd:Q116546701"]) bind213 --> bind2 bind214(["wd:Q116547044"]) bind214 --> bind2 v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> v8 v3 --"wdt:P5008"--> c4 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P1619".-> v4 v3 --"wdt:P3999"--> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P127".-> v6 end end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end