query-e890e95c871ec34f116c900f158fb276

rq turtle/ttl

.https://www.wikidata.org/wiki/User:HotMess If you find this page on any site other than Wikidata (www.wikidata.org), you are viewing a mirror site. Be aware that the page may be outdated, and that the user this page belongs to may have no personal affiliation with any site other than Wikidata itself. The original page is located at This is a Wikidata user page.. projects Wikimedia is the unique login of this user for all public HotMess: Unified login I'll fill this in when I think of something to put here. about me i contribute sometimes i guess User:HotMess/common.jsthis is here in case I get a case of the 'i forgor': some queries for future reference: --- Rollercoasters with height and length

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?coaster ?coasterLabel ?height ?heightUnitLabel ?length ?lengthUnitLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?coaster (wdt:P31/(wdt:P279*)) wd:Q1640829.
  # rollercoaster: wd:Q204832
  # hypercoaster: wd:Q1640829
  # gigacoaster: wd:Q42178109
  # stratacoaster: wd:Q112769012

  # TODO: get heights on same scale as each other
  OPTIONAL {
    ?coaster p:P2048 [
      a wikibase:BestRank ; 
      psv:P2048 [
        wikibase:quantityAmount ?height ; wikibase:quantityUnit ?heightUnit ]
      ] .
  }
  # TODO: get lengths on same scale as each other
  OPTIONAL {
    ?coaster p:P2043 [
      a wikibase:BestRank ; 
      psv:P2043 [
        wikibase:quantityAmount ?length ; wikibase:quantityUnit ?lengthUnit ]
      ] .
  }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?coaster"):::projected v2("?height"):::projected v3("?heightUnit") v4("?length"):::projected v5("?lengthUnit") a1((" ")) a2((" ")) a3((" ")) a4((" ")) a5((" ")) c9(["wikibase:BestRank"]):::iri c2(["bd:serviceParam"]):::iri c7(["wd:Q1640829"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c7 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; a2 -."a".-> c9 a3 --"wikibase:quantityAmount"--> v2 a3 --"wikibase:quantityUnit"--> v3 a2 --"p:statement/value/P2048"--> a3 v1 --"p:P2048"--> a2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; a4 -."a".-> c9 a5 --"wikibase:quantityAmount"--> v4 a5 --"wikibase:quantityUnit"--> v5 a4 --"p:statement/value/P2043"--> a5 v1 --"p:P2043"--> a4 end