query-73e6914e9ae566f9e2af673260fc8e42

rq turtle/ttl

List TTRPGs systems with dice types

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#>
SELECT DISTINCT ?item ?itemLabel ?mechaLabel ?diceLabel WHERE {
      {?item wdt:P31 wd:Q1643932. }
      UNION
      {?item wdt:P31 wd:Q2164067. }
      SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
      OPTIONAL {?item wdt:P4151 ?mecha} 
      OPTIONAL { ?item (wdt:P577|wdt:P571) ?date.}
      OPTIONAL { ?item wdt:P2283 ?dice.}
}
ORDER BY DESC(?mechaLabel)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v4("?date") v5("?dice") v2("?item"):::projected v3("?mecha") v1("?mechaLabel"):::projected c3(["wd:Q2164067"]):::iri c5(["bd:serviceParam"]):::iri c2(["wd:Q1643932"]):::iri c7(["en"]):::literal subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c3 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P31"--> c2 end union0r <== or ==> union0l end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P4151".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; v2 -."wdt:P571".-> v4 end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v2 --"wdt:P577"--> v4 end union1r <== or ==> union1l end end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P2283".-> v5 end