Simple Question (Direct)
Simple Question
Q26868773
P172
Q2472587
USER
What is the ethnicity of Ricardo Kwiek ?
(Q26868773,P172,c(Q2472587))
action filter_type
action find
entity Q26868773
relation P172
type Q2472587
['Q26868773', 'P172', {'concept': 'Q2472587'}]
SELECT DISTINCT ?h WHERE { resource:Q26868773 property:P172 ?h . ?h rdf:type ontology:Q2472587 }
Ricardo Kwiek
action filter_type
action find
entity Ricardo Kwiek
relation ethnic group
type people
['Ricardo Kwiek', 'ethnic group', {'concept': 'people'}]
SELECT DISTINCT ?h WHERE { resource:Ricardo_Kwiek property:ethnic_group ?h . ?h rdf:type ontology:people }
[]
people
Q8060
SYSTEM
Romani people
Q8060
(Q26868773,P172,c(Q2472587))
action filter_type
action find
entity Q26868773
relation P172
type Q2472587
The ethnicity of Ricardo Kwiek is of [ANSWER]
['Q26868773', 'P172', {'concept': 'Q2472587'}]
SELECT DISTINCT ?h WHERE { resource:Q26868773 property:P172 ?h . ?h rdf:type ontology:Q2472587 }
Romani people
The ethnicity of Ricardo Kwiek is of Romani people
Romani people
action filter_type
action find
entity Ricardo Kwiek
relation ethnic group
type people
['Ricardo Kwiek', 'ethnic group', {'concept': 'people'}]
SELECT DISTINCT ?h WHERE { resource:Ricardo_Kwiek property:ethnic_group ?h . ?h rdf:type ontology:people }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q26868773
P21
Q290
USER
What is the sex of Ricardo Kwiek ?
(Q26868773,P21,c(Q290))
action filter_type
action find
entity Q26868773
relation P21
type Q290
['Q26868773', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?g WHERE { resource:Q26868773 property:P21 ?g . ?g rdf:type ontology:Q290 }
Ricardo Kwiek
action filter_type
action find
entity Ricardo Kwiek
relation gender
type sex
['Ricardo Kwiek', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?g WHERE { resource:Ricardo_Kwiek property:gender ?g . ?g rdf:type ontology:sex }
[]
sex
Q6581097
SYSTEM
male
Q6581097
(Q26868773,P21,c(Q290))
action filter_type
action find
entity Q26868773
relation P21
type Q290
The sex of Ricardo Kwiek is the [ANSWER]
['Q26868773', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?g WHERE { resource:Q26868773 property:P21 ?g . ?g rdf:type ontology:Q290 }
male
The sex of Ricardo Kwiek is the male
male
action filter_type
action find
entity Ricardo Kwiek
relation gender
type sex
['Ricardo Kwiek', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?g WHERE { resource:Ricardo_Kwiek property:gender ?g . ?g rdf:type ontology:sex }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q12310560 Q26868773
P27
Q1048835
USER
Which political territories do Ricardo Kwiek or Esben Bjerre Hansen belong to ?
OR((Q26868773,P27,c(Q1048835)), (Q12310560,P27,c(Q1048835)))
action filter_type
action union
action find
entity Q26868773
relation P27
action find
entity Q12310560
relation P27
type Q1048835
{'OR': [['Q26868773', 'P27', {'concept': 'Q1048835'}], ['Q12310560', 'P27', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?d WHERE { { { resource:Q26868773 property:P27 ?d } UNION { resource:Q12310560 property:P27 ?d } } . ?d rdf:type ontology:Q1048835 }
Esben Bjerre Hansen Ricardo Kwiek
action filter_type
action union
action find
entity Ricardo Kwiek
relation country of citizenship
action find
entity Esben Bjerre Hansen
relation country of citizenship
type political territorial entity
{'OR': [['Ricardo Kwiek', 'country of citizenship', {'concept': 'political territorial entity'}], ['Esben Bjerre Hansen', 'country of citizenship', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?d WHERE { { { resource:Ricardo_Kwiek property:country_of_citizenship ?d } UNION { resource:Esben_Bjerre_Hansen property:country_of_citizenship ?d } } . ?d rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q183 Q35
SYSTEM
Germany, Denmark
Q183 Q35
OR((Q26868773,P27,c(Q1048835)), (Q12310560,P27,c(Q1048835)))
action filter_type
action union
action find
entity Q26868773
relation P27
action find
entity Q12310560
relation P27
type Q1048835
Ricardo Kwiek or Esben Bjerre Hansen belong to both [ANSWERS]
{'OR': [['Q26868773', 'P27', {'concept': 'Q1048835'}], ['Q12310560', 'P27', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?d WHERE { { { resource:Q26868773 property:P27 ?d } UNION { resource:Q12310560 property:P27 ?d } } . ?d rdf:type ontology:Q1048835 }
Germany Denmark
Ricardo Kwiek or Esben Bjerre Hansen belong to both Germany and Denmark
Germany Denmark
action filter_type
action union
action find
entity Ricardo Kwiek
relation country of citizenship
action find
entity Esben Bjerre Hansen
relation country of citizenship
type political territorial entity
{'OR': [['Ricardo Kwiek', 'country of citizenship', {'concept': 'political territorial entity'}], ['Esben Bjerre Hansen', 'country of citizenship', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?d WHERE { { { resource:Ricardo_Kwiek property:country_of_citizenship ?d } UNION { resource:Esben_Bjerre_Hansen property:country_of_citizenship ?d } } . ?d rdf:type ontology:political_territorial_entity }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q12305259
P27
Q502895
USER
Are Carl Helmuth von Lepel a native of those political territories ?
(Q12305259,P27,Q183) (Q12305259,P27,Q35)
action is_in
entity prev_answer
action find
entity Q12305259
relation P27
['Q12305259', 'P27', 'Q183'] ['Q12305259', 'P27', 'Q35']
ASK WHERE { VALUES ( ?y ) { ( resource:Q183 ) ( resource:Q35 ) } . resource:Q12305259 property:P27 ?y }
Carl Helmuth von Lepel
action is_in
entity prev_answer
action find
entity Carl Helmuth von Lepel
relation country of citizenship
['Carl Helmuth von Lepel', 'country of citizenship', 'Germany'] ['Carl Helmuth von Lepel', 'country of citizenship', 'Denmark']
ASK WHERE { VALUES ( ?y ) { ( resource:Germany ) ( resource:Denmark ) } . resource:Carl_Helmuth_von_Lepel property:country_of_citizenship ?y }
[]
common name
SYSTEM
YES
(Q12305259,P27,Q183) (Q12305259,P27,Q35)
action is_in
entity prev_answer
action find
entity Q12305259
relation P27
[ANSWER]
['Q12305259', 'P27', 'Q183'] ['Q12305259', 'P27', 'Q35']
ASK WHERE { VALUES ( ?y ) { ( resource:Q183 ) ( resource:Q35 ) } . resource:Q12305259 property:P27 ?y }
Yes
action is_in
entity prev_answer
action find
entity Carl Helmuth von Lepel
relation country of citizenship
['Carl Helmuth von Lepel', 'country of citizenship', 'Germany'] ['Carl Helmuth von Lepel', 'country of citizenship', 'Denmark']
ASK WHERE { VALUES ( ?y ) { ( resource:Germany ) ( resource:Denmark ) } . resource:Carl_Helmuth_von_Lepel property:country_of_citizenship ?y }
[]
Quantitative Reasoning (All)
Quantitative|Atleast/ Atmost/ Approx. the same/Equal|Mult. entity type
P85
Q484692 Q7725634 Q1048835
USER
Which political territories have an anthem named exactly 2 hymns and literary works ?
(c(Q1048835),P85,c(Q484692)|c(Q7725634))
action equal
action union
action find_tuple_counts
relation P85
type Q1048835
type Q484692
action find_tuple_counts
relation P85
type Q1048835
type Q7725634
value 2
[{'concept': 'Q1048835'}, 'P85', [{'concept': 'Q484692'}, {'concept': 'Q7725634'}]]
SELECT DISTINCT ?h WHERE { { SELECT DISTINCT ( COUNT ( ?i ) AS ?r ) ?h WHERE { { ?h property:P85 ?i . ?h rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q7725634 } UNION { ?h property:P85 ?i . ?h rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q484692 } } GROUP BY ?h } . FILTER ( ?r = 2 ) }
action equal
action union
action find_tuple_counts
relation anthem
type political territorial entity
type hymn
action find_tuple_counts
relation anthem
type political territorial entity
type literary work
value 2
[{'concept': 'political territorial entity'}, 'anthem', [{'concept': 'hymn'}, {'concept': 'literary work'}]]
SELECT DISTINCT ?h WHERE { { SELECT DISTINCT ( COUNT ( ?i ) AS ?r ) ?h WHERE { { ?h property:anthem ?i . ?h rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:literary_work } UNION { ?h property:anthem ?i . ?h rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:hymn } } GROUP BY ?h } . FILTER ( ?r = 2 ) }
[]
hymn literary work political territorial entity
Q408 Q35 Q769
SYSTEM
Australia, Denmark, Grenada
Q769 Q766 Q781 Q35 Q408
(c(Q1048835),P85,c(Q484692)|c(Q7725634))
action equal
action union
action find_tuple_counts
relation P85
type Q1048835
type Q484692
action find_tuple_counts
relation P85
type Q1048835
type Q7725634
value 2
[ANSWERS] have an anthem named exactly 2 hymns and literary works
[{'concept': 'Q1048835'}, 'P85', [{'concept': 'Q484692'}, {'concept': 'Q7725634'}]]
SELECT DISTINCT ?h WHERE { { SELECT DISTINCT ( COUNT ( ?i ) AS ?r ) ?h WHERE { { ?h property:P85 ?i . ?h rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q7725634 } UNION { ?h property:P85 ?i . ?h rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q484692 } } GROUP BY ?h } . FILTER ( ?r = 2 ) }
Grenada Jamaica Antigua and Barbuda Denmark Australia
Australia, Denmark and Grenada have an anthem named exactly 2 hymns and literary works
Australia Denmark Grenada
action equal
action union
action find_tuple_counts
relation anthem
type political territorial entity
type hymn
action find_tuple_counts
relation anthem
type political territorial entity
type literary work
value 2
[{'concept': 'political territorial entity'}, 'anthem', [{'concept': 'hymn'}, {'concept': 'literary work'}]]
SELECT DISTINCT ?h WHERE { { SELECT DISTINCT ( COUNT ( ?i ) AS ?r ) ?h WHERE { { ?h property:anthem ?i . ?h rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:literary_work } UNION { ?h property:anthem ?i . ?h rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:hymn } } GROUP BY ?h } . FILTER ( ?r = 2 ) }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q2328919
P530
Q15617994
USER
Do Kruisstraat have ambassadorial relations with those political territories ?
(Q2328919,P530,Q408) (Q2328919,P530,Q35) (Q2328919,P530,Q769)
action is_in
entity prev_answer
action find
entity Q2328919
relation P530
['Q2328919', 'P530', 'Q408'] ['Q2328919', 'P530', 'Q35'] ['Q2328919', 'P530', 'Q769']
ASK WHERE { VALUES ( ?r ) { ( resource:Q769 ) ( resource:Q766 ) ( resource:Q781 ) } . resource:Q2328919 property:P530 ?r }
Kruisstraat
action is_in
entity prev_answer
action find
entity Kruisstraat
relation diplomatic relation
['Kruisstraat', 'diplomatic relation', 'Australia'] ['Kruisstraat', 'diplomatic relation', 'Denmark'] ['Kruisstraat', 'diplomatic relation', 'Grenada']
ASK WHERE { VALUES ( ?r ) { ( resource:Grenada ) ( resource:Jamaica ) ( resource:Antigua_and_Barbuda ) } . resource:Kruisstraat property:diplomatic_relation ?r }
[]
designation for an administrative territorial entity
SYSTEM
NO
(Q2328919,P530,Q408) (Q2328919,P530,Q35) (Q2328919,P530,Q769)
action is_in
entity prev_answer
action find
entity Q2328919
relation P530
[ANSWER]
['Q2328919', 'P530', 'Q408'] ['Q2328919', 'P530', 'Q35'] ['Q2328919', 'P530', 'Q769']
ASK WHERE { VALUES ( ?r ) { ( resource:Q769 ) ( resource:Q766 ) ( resource:Q781 ) } . resource:Q2328919 property:P530 ?r }
No
action is_in
entity prev_answer
action find
entity Kruisstraat
relation diplomatic relation
['Kruisstraat', 'diplomatic relation', 'Australia'] ['Kruisstraat', 'diplomatic relation', 'Denmark'] ['Kruisstraat', 'diplomatic relation', 'Grenada']
ASK WHERE { VALUES ( ?r ) { ( resource:Grenada ) ( resource:Jamaica ) ( resource:Antigua_and_Barbuda ) } . resource:Kruisstraat property:diplomatic_relation ?r }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Mult. entity type
Q12310560 Q3422924
P21
Q290
USER
How many sexes do Esben Bjerre Hansen or Moaning Myrtle possess ?
(Q12310560,P21,c(Q290)) (Q3422924,P21,c(Q290))
action count
action union
action filter_type
action find
entity Q12310560
relation P21
type Q290
action filter_type
action find
entity Q3422924
relation P21
type Q290
['Q12310560', 'P21', {'concept': 'Q290'}] ['Q3422924', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?x ) WHERE { { resource:Q12310560 property:P21 ?n . ?n rdf:type ontology:Q290 } UNION { ?n rdf:type ontology:Q290 . resource:Q3422924 property:P21 ?n } }
Esben Bjerre Hansen Moaning Myrtle
action count
action union
action filter_type
action find
entity Esben Bjerre Hansen
relation gender
type sex
action filter_type
action find
entity Moaning Myrtle
relation gender
type sex
['Esben Bjerre Hansen', 'gender', {'concept': 'sex'}] ['Moaning Myrtle', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?x ) WHERE { { resource:Esben_Bjerre_Hansen property:gender ?n . ?n rdf:type ontology:sex } UNION { ?n rdf:type ontology:sex . resource:Moaning_Myrtle property:gender ?n } }
[]
sex
SYSTEM
2
Q6581097 Q6581072
(Q12310560,P21,c(Q290)) (Q3422924,P21,c(Q290))
action count
action union
action filter_type
action find
entity Q12310560
relation P21
type Q290
action filter_type
action find
entity Q3422924
relation P21
type Q290
[ANSWER]
['Q12310560', 'P21', {'concept': 'Q290'}] ['Q3422924', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?x ) WHERE { { resource:Q12310560 property:P21 ?n . ?n rdf:type ontology:Q290 } UNION { ?n rdf:type ontology:Q290 . resource:Q3422924 property:P21 ?n } }
male female
2
action count
action union
action filter_type
action find
entity Esben Bjerre Hansen
relation gender
type sex
action filter_type
action find
entity Moaning Myrtle
relation gender
type sex
['Esben Bjerre Hansen', 'gender', {'concept': 'sex'}] ['Moaning Myrtle', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?x ) WHERE { { resource:Esben_Bjerre_Hansen property:gender ?n . ?n rdf:type ontology:sex } UNION { ?n rdf:type ontology:sex . resource:Moaning_Myrtle property:gender ?n } }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type
Q950940
P706
Q15324 Q1048835 Q1048835
USER
How many political territories have their location as greater number of bodies of water or political territories than Marratxí ?
(c(Q1048835),P706,c(Q15324)|c(Q1048835))
action count
action greater
action union
action find_tuple_counts
relation P706
type Q1048835
type Q15324
action find_tuple_counts
relation P706
type Q1048835
type Q1048835
action count
action filter_multi_types
action find
entity Q950940
relation P706
type Q15324
type Q1048835
[{'concept': 'Q1048835'}, 'P706', [{'concept': 'Q15324'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?t ) AS ?y ) ?l WHERE { VALUES ( ?q ) { ( ontology:Q1048835 ) ( ontology:Q15324 ) } . ?t rdf:type ?q } GROUP BY ?l } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?i ) WHERE { resource:Q950940 property:P706 ?v . { VALUES ( ?u ) { ( ontology:Q15324 ) ( ontology:Q1048835 ) } . ?v rdf:type ?u } } } . FILTER ( ?y > ?i ) }
Marratxí
action count
action greater
action union
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type body of water
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type political territorial entity
action count
action filter_multi_types
action find
entity Marratxí
relation located on terrain feature
type body of water
type political territorial entity
[{'concept': 'political territorial entity'}, 'located on terrain feature', [{'concept': 'body of water'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?t ) AS ?y ) ?l WHERE { VALUES ( ?q ) { ( ontology:political_territorial_entity ) ( ontology:body_of_water ) } . ?t rdf:type ?q } GROUP BY ?l } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?i ) WHERE { resource:Marratxí property:located_on_terrain_feature ?v . { VALUES ( ?u ) { ( ontology:body_of_water ) ( ontology:political_territorial_entity ) } . ?v rdf:type ?u } } } . FILTER ( ?y > ?i ) }
[]
body of water political territorial entity political territorial entity
SYSTEM
3
Q9676 Q168159 Q9337
(c(Q1048835),P706,c(Q15324)|c(Q1048835))
action count
action greater
action union
action find_tuple_counts
relation P706
type Q1048835
type Q15324
action find_tuple_counts
relation P706
type Q1048835
type Q1048835
action count
action filter_multi_types
action find
entity Q950940
relation P706
type Q15324
type Q1048835
[ANSWER]
[{'concept': 'Q1048835'}, 'P706', [{'concept': 'Q15324'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?t ) AS ?y ) ?l WHERE { VALUES ( ?q ) { ( ontology:Q1048835 ) ( ontology:Q15324 ) } . ?t rdf:type ?q } GROUP BY ?l } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?i ) WHERE { resource:Q950940 property:P706 ?v . { VALUES ( ?u ) { ( ontology:Q15324 ) ( ontology:Q1048835 ) } . ?v rdf:type ?u } } } . FILTER ( ?y > ?i ) }
Isle of Man Anglesey Flemish Region
3
action count
action greater
action union
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type body of water
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type political territorial entity
action count
action filter_multi_types
action find
entity Marratxí
relation located on terrain feature
type body of water
type political territorial entity
[{'concept': 'political territorial entity'}, 'located on terrain feature', [{'concept': 'body of water'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?l ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?t ) AS ?y ) ?l WHERE { VALUES ( ?q ) { ( ontology:political_territorial_entity ) ( ontology:body_of_water ) } . ?t rdf:type ?q } GROUP BY ?l } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?i ) WHERE { resource:Marratxí property:located_on_terrain_feature ?v . { VALUES ( ?u ) { ( ontology:body_of_water ) ( ontology:political_territorial_entity ) } . ?v rdf:type ?u } } } . FILTER ( ?y > ?i ) }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type|Incomplete
Q170213
P706
Q15324 Q1048835 Q1048835
USER
And how about Zakarpattia Oblast?
(c(Q1048835),P706,c(Q15324)|c(Q1048835))
action count
action greater
action union
action find_tuple_counts
relation P706
type Q1048835
type Q15324
action find_tuple_counts
relation P706
type Q1048835
type Q1048835
action count
action filter_multi_types
action find
entity Q170213
relation P706
type Q15324
type Q1048835
[{'concept': 'Q1048835'}, 'P706', [{'concept': 'Q15324'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ( COUNT ( ?x ) AS ?s ) WHERE { { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?x WHERE { VALUES ( ?w ) { ( ontology:Q15324 ) ( ontology:Q1048835 ) } . ?l rdf:type ?w } GROUP BY ?x } . { SELECT DISTINCT ( COUNT ( ?i ) AS ?c ) WHERE { resource:Q170213 property:P706 ?i . { { ?i rdf:type ontology:Q1048835 } UNION { ?i rdf:type ontology:Q15324 } } } } . FILTER ( ?p > ?c ) }
Zakarpattia Oblast
action count
action greater
action union
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type body of water
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type political territorial entity
action count
action filter_multi_types
action find
entity Zakarpattia Oblast
relation located on terrain feature
type body of water
type political territorial entity
[{'concept': 'political territorial entity'}, 'located on terrain feature', [{'concept': 'body of water'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?x ) AS ?s ) WHERE { { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?x WHERE { VALUES ( ?w ) { ( ontology:body_of_water ) ( ontology:political_territorial_entity ) } . ?l rdf:type ?w } GROUP BY ?x } . { SELECT DISTINCT ( COUNT ( ?i ) AS ?c ) WHERE { resource:Zakarpattia_Oblast property:located_on_terrain_feature ?i . { { ?i rdf:type ontology:political_territorial_entity } UNION { ?i rdf:type ontology:body_of_water } } } } . FILTER ( ?p > ?c ) }
[]
body of water political territorial entity political territorial entity
SYSTEM
3
Q9676 Q168159 Q9337
(c(Q1048835),P706,c(Q15324)|c(Q1048835))
action count
action greater
action union
action find_tuple_counts
relation P706
type Q1048835
type Q15324
action find_tuple_counts
relation P706
type Q1048835
type Q1048835
action count
action filter_multi_types
action find
entity Q170213
relation P706
type Q15324
type Q1048835
[ANSWER]
[{'concept': 'Q1048835'}, 'P706', [{'concept': 'Q15324'}, {'concept': 'Q1048835'}]]
SELECT DISTINCT ( COUNT ( ?x ) AS ?s ) WHERE { { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?x WHERE { VALUES ( ?w ) { ( ontology:Q15324 ) ( ontology:Q1048835 ) } . ?l rdf:type ?w } GROUP BY ?x } . { SELECT DISTINCT ( COUNT ( ?i ) AS ?c ) WHERE { resource:Q170213 property:P706 ?i . { { ?i rdf:type ontology:Q1048835 } UNION { ?i rdf:type ontology:Q15324 } } } } . FILTER ( ?p > ?c ) }
Isle of Man Anglesey Flemish Region
3
action count
action greater
action union
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type body of water
action find_tuple_counts
relation located on terrain feature
type political territorial entity
type political territorial entity
action count
action filter_multi_types
action find
entity Zakarpattia Oblast
relation located on terrain feature
type body of water
type political territorial entity
[{'concept': 'political territorial entity'}, 'located on terrain feature', [{'concept': 'body of water'}, {'concept': 'political territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?x ) AS ?s ) WHERE { { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?x WHERE { VALUES ( ?w ) { ( ontology:body_of_water ) ( ontology:political_territorial_entity ) } . ?l rdf:type ?w } GROUP BY ?x } . { SELECT DISTINCT ( COUNT ( ?i ) AS ?c ) WHERE { resource:Zakarpattia_Oblast property:located_on_terrain_feature ?i . { { ?i rdf:type ontology:political_territorial_entity } UNION { ?i rdf:type ontology:body_of_water } } } } . FILTER ( ?p > ?c ) }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q26692442 Q183
P530 P17
Q15617994
USER
Which administrative territories have diplomatic relations with Germany and are mayor of Alfarnate located in ?
AND((Q183,P530,c(Q15617994)), (Q26692442,P17,c(Q15617994)))
action filter_type
action intersection
action find
entity Q183
relation P530
action find
entity Q26692442
relation P17
type Q15617994
{'AND': [['Q183', 'P530', {'concept': 'Q15617994'}], ['Q26692442', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?p WHERE { resource:Q183 property:P530 ?p . resource:Q26692442 property:P17 ?p . ?p rdf:type ontology:Q15617994 }
mayor of Alfarnate Germany
action filter_type
action intersection
action find
entity Germany
relation diplomatic relation
action find
entity mayor of Alfarnate
relation country
type designation for an administrative territorial entity
{'AND': [['Germany', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}], ['mayor of Alfarnate', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?p WHERE { resource:Germany property:diplomatic_relation ?p . resource:mayor_of_Alfarnate property:country ?p . ?p rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q29
SYSTEM
Spain
Q29
AND((Q183,P530,c(Q15617994)), (Q26692442,P17,c(Q15617994)))
action filter_type
action intersection
action find
entity Q183
relation P530
action find
entity Q26692442
relation P17
type Q15617994
[ANSWER] have diplomatic relations with Germany and are mayor of Alfarnate located in
{'AND': [['Q183', 'P530', {'concept': 'Q15617994'}], ['Q26692442', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?p WHERE { resource:Q183 property:P530 ?p . resource:Q26692442 property:P17 ?p . ?p rdf:type ontology:Q15617994 }
Spain
Spain have diplomatic relations with Germany and are mayor of Alfarnate located in
Spain
action filter_type
action intersection
action find
entity Germany
relation diplomatic relation
action find
entity mayor of Alfarnate
relation country
type designation for an administrative territorial entity
{'AND': [['Germany', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}], ['mayor of Alfarnate', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?p WHERE { resource:Germany property:diplomatic_relation ?p . resource:mayor_of_Alfarnate property:country ?p . ?p rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Verification (Boolean) (All)
Verification|3 entities, 2 direct, 2(direct) are query entities, subject is indirect
Q29 Q458 Q15378660
P47
Q56061
USER
Does that administrative territory shares border with European Union and Ahmadabad-e Panjeh ?
(Q29,P47,Q458) (Q29,P47,Q15378660)
action is_in
entity Q29
action intersection
action find_reverse
entity Q458
relation P47
action find_reverse
entity Q15378660
relation P47
['Q29', 'P47', 'Q458'] ['Q29', 'P47', 'Q15378660']
ASK WHERE { resource:Q29 property:P47 resource:Q15378660 . resource:Q29 property:P47 resource:Q458 }
Spain European Union Ahmadabad-e Panjeh
action is_in
entity Spain
action intersection
action find_reverse
entity European Union
relation shares border with
action find_reverse
entity Ahmadabad-e Panjeh
relation shares border with
['Spain', 'shares border with', 'European Union'] ['Spain', 'shares border with', 'Ahmadabad-e Panjeh']
ASK WHERE { resource:Spain property:shares_border_with resource:Ahmadabad-e_Panjeh . resource:Spain property:shares_border_with resource:European_Union }
[]
administrative territorial entity
SYSTEM
YES and NO respectively
(Q29,P47,Q458) (Q29,P47,Q15378660)
action is_in
entity Q29
action intersection
action find_reverse
entity Q458
relation P47
action find_reverse
entity Q15378660
relation P47
[ANSWER]
['Q29', 'P47', 'Q458'] ['Q29', 'P47', 'Q15378660']
ASK WHERE { resource:Q29 property:P47 resource:Q15378660 . resource:Q29 property:P47 resource:Q458 }
YES and NO respectively
action is_in
entity Spain
action intersection
action find_reverse
entity European Union
relation shares border with
action find_reverse
entity Ahmadabad-e Panjeh
relation shares border with
['Spain', 'shares border with', 'European Union'] ['Spain', 'shares border with', 'Ahmadabad-e Panjeh']
ASK WHERE { resource:Spain property:shares_border_with resource:Ahmadabad-e_Panjeh . resource:Spain property:shares_border_with resource:European_Union }
[]