query-6ff59df73d7b8625a25d04b4d71f8dd2

rq turtle/ttl

What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } } What is or are the lowest common ancestor(s) of a

church, a mosque, a synagogue and a palace in the

Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE { ?lcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 . filter not exists { ?sublcs ^wdt:P279 wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ; wdt:P279 ?lcs . } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . } }

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#>
# What is or are the lowest common ancestor(s) of a 
# church, a mosque, a synagogue and a palace in the 
# Wikidata ontology ? Answer : an architectural structure

SELECT ?lcs ?lcsLabel WHERE {
    ?lcs ^wdt:P279* wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 .
    filter not exists {
    ?sublcs ^wdt:P279* wd:Q32815, wd:Q34627, wd:Q16970, wd:Q16560 ;
          wdt:P279 ?lcs . }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en" . }
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?lcs"):::projected v1("?sublcs") c1(["wd:Q32815"]):::iri c7(["bd:serviceParam"]):::iri c5(["wd:Q16560"]):::iri c4(["wd:Q16970"]):::iri c3(["wd:Q34627"]):::iri c9(["#91;AUTO_LANGUAGE#93;, en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0c1 --"wdt:P279"--> e0v1 e0c3 --"wdt:P279"--> e0v1 e0c4 --"wdt:P279"--> e0v1 e0c5 --"wdt:P279"--> e0v1 e0v1 --"wdt:P279"--> e0v2 e0v2("?lcs"):::projected e0v1("?sublcs"):::projected e0c1(["wd:Q32815"]):::iri e0c5(["wd:Q16560"]):::iri e0c4(["wd:Q16970"]):::iri e0c3(["wd:Q34627"]):::iri end f0--EXISTS--> f0e0 f0 --> c1 f0 --> c2 f0 --> v1 f0 --> c3 f0 --> c4 f0 --> c5 f0 --> v2 c1 --"wdt:P279"--> v1 c3 --"wdt:P279"--> v1 c4 --"wdt:P279"--> v1 c5 --"wdt:P279"--> v1 v1 --"wdt:P279"--> v2 c1 --"wdt:P279"--> v2 c3 --"wdt:P279"--> v2 c4 --"wdt:P279"--> v2 c5 --"wdt:P279"--> v2 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end