query-b05c84213dbfafcd2ba5b85a419e2582

rq turtle/ttl

start time (P580),  stated in (P248),  instance of (P31)Properties:  town in Hungary (Q13218690)Items:

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 prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?egyetem ?egyetemLabel ?sc ?ref ?refLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],hu". }
  ?item wdt:P31 wd:Q13218690.
  ?item p:P31 ?statement.
  ?statement ps:P31 ?egyetem.
  OPTIONAL { ?statement pq:P580 ?sc. }
  ?item p:P31 [ prov:wasDerivedFrom ?ref ].
  OPTIONAL { ?ref pr:P248 [] . }                        
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?egyetem"):::projected v1("?item"):::projected v5("?ref"):::projected v4("?sc"):::projected v2("?statement") a2((" ")) a1((" ")) c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,hu"]):::literal c6(["wd:Q13218690"]):::iri subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end v1 --"p:direct/P31"--> c6 v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P580".-> v4 end a1 --"prov:wasDerivedFrom"--> v5 v1 --"p:P31"--> a1 subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:reference/P248".-> a2 end