Simple Question (Direct)
Simple Question
Q3004672
P344
Q502895
USER
Who is the cinematographer of Their Purple Moment ?
(Q3004672,P344,c(Q502895))
action filter_type
action find
entity Q3004672
relation P344
type Q502895
['Q3004672', 'P344', {'concept': 'Q502895'}]
SELECT DISTINCT ?h WHERE { resource:Q3004672 property:P344 ?h . ?h rdf:type ontology:Q502895 }
Their Purple Moment
action filter_type
action find
entity Their Purple Moment
relation director of photography
type common name
['Their Purple Moment', 'director of photography', {'concept': 'common name'}]
SELECT DISTINCT ?h WHERE { resource:Their_Purple_Moment property:director_of_photography ?h . ?h rdf:type ontology:common_name }
[]
common name
Q51490
SYSTEM
George Stevens
Q51490
(Q3004672,P344,c(Q502895))
action filter_type
action find
entity Q3004672
relation P344
type Q502895
The cinematographer of Their Purple Moment is to [ANSWER]
['Q3004672', 'P344', {'concept': 'Q502895'}]
SELECT DISTINCT ?h WHERE { resource:Q3004672 property:P344 ?h . ?h rdf:type ontology:Q502895 }
George Stevens
The cinematographer of Their Purple Moment is to George Stevens
George Stevens
action filter_type
action find
entity Their Purple Moment
relation director of photography
type common name
['Their Purple Moment', 'director of photography', {'concept': 'common name'}]
SELECT DISTINCT ?h WHERE { resource:Their_Purple_Moment property:director_of_photography ?h . ?h rdf:type ontology:common_name }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q3004672
P136
Q1792379
USER
What can be considered as category for Their Purple Moment ?
(Q3004672,P136,c(Q1792379))
action filter_type
action find
entity Q3004672
relation P136
type Q1792379
['Q3004672', 'P136', {'concept': 'Q1792379'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:Q1792379 . resource:Q3004672 property:P136 ?s }
Their Purple Moment
action filter_type
action find
entity Their Purple Moment
relation genre
type art genre
['Their Purple Moment', 'genre', {'concept': 'art genre'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:art_genre . resource:Their_Purple_Moment property:genre ?s }
[]
art genre
Q663106 Q157443
SYSTEM
buddy film, comedy film
Q663106 Q157443
(Q3004672,P136,c(Q1792379))
action filter_type
action find
entity Q3004672
relation P136
type Q1792379
And [ANSWERS] can be considered as category for Their Purple Moment
['Q3004672', 'P136', {'concept': 'Q1792379'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:Q1792379 . resource:Q3004672 property:P136 ?s }
buddy film comedy film
And buddy film and comedy film can be considered as category for Their Purple Moment
buddy film comedy film
action filter_type
action find
entity Their Purple Moment
relation genre
type art genre
['Their Purple Moment', 'genre', {'concept': 'art genre'}]
SELECT DISTINCT ?s WHERE { ?s rdf:type ontology:art_genre . resource:Their_Purple_Moment property:genre ?s }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q2542242
P136
Q838948
USER
Do Road to Morocco have those art genres as their category ?
(Q2542242,P136,Q663106) (Q2542242,P136,Q157443)
action is_in
entity prev_answer
action find
entity Q2542242
relation P136
['Q2542242', 'P136', 'Q663106'] ['Q2542242', 'P136', 'Q157443']
ASK WHERE { resource:Q2542242 property:P136 ?w . VALUES ( ?w ) { ( resource:Q663106 ) ( resource:Q157443 ) } }
Road to Morocco
action is_in
entity prev_answer
action find
entity Road to Morocco
relation genre
['Road to Morocco', 'genre', 'buddy film'] ['Road to Morocco', 'genre', 'comedy film']
ASK WHERE { resource:Road_to_Morocco property:genre ?w . VALUES ( ?w ) { ( resource:buddy_film ) ( resource:comedy_film ) } }
[]
work of art
SYSTEM
YES
(Q2542242,P136,Q663106) (Q2542242,P136,Q157443)
action is_in
entity prev_answer
action find
entity Q2542242
relation P136
[ANSWER]
['Q2542242', 'P136', 'Q663106'] ['Q2542242', 'P136', 'Q157443']
ASK WHERE { resource:Q2542242 property:P136 ?w . VALUES ( ?w ) { ( resource:Q663106 ) ( resource:Q157443 ) } }
Yes
action is_in
entity prev_answer
action find
entity Road to Morocco
relation genre
['Road to Morocco', 'genre', 'buddy film'] ['Road to Morocco', 'genre', 'comedy film']
ASK WHERE { resource:Road_to_Morocco property:genre ?w . VALUES ( ?w ) { ( resource:buddy_film ) ( resource:comedy_film ) } }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type
Q18353841
P180
Q5 Q502895 Q1792379
USER
How many art genres express more number of humen or people than Architectural painting ?
(c(Q1792379),P180,c(Q5)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P180
type Q1792379
type Q5
action find_tuple_counts
relation P180
type Q1792379
type Q502895
action count
action filter_multi_types
action find
entity Q18353841
relation P180
type Q5
type Q502895
[{'concept': 'Q1792379'}, 'P180', [{'concept': 'Q5'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?m ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?e ) AS ?v ) ?m WHERE { VALUES ( ?t ) { ( ontology:Q502895 ) ( ontology:Q5 ) } . ?e rdf:type ?t } GROUP BY ?m } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?z ) WHERE { resource:Q18353841 property:P180 ?l . { VALUES ( ?b ) { ( ontology:Q5 ) ( ontology:Q502895 ) } . ?l rdf:type ?b } } } . FILTER ( ?v > ?z ) }
Architectural painting
action count
action greater
action union
action find_tuple_counts
relation depicts
type art genre
type human
action find_tuple_counts
relation depicts
type art genre
type common name
action count
action filter_multi_types
action find
entity Architectural painting
relation depicts
type human
type common name
[{'concept': 'art genre'}, 'depicts', [{'concept': 'human'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?m ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?e ) AS ?v ) ?m WHERE { VALUES ( ?t ) { ( ontology:common_name ) ( ontology:human ) } . ?e rdf:type ?t } GROUP BY ?m } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?z ) WHERE { resource:Architectural_painting property:depicts ?l . { VALUES ( ?b ) { ( ontology:human ) ( ontology:common_name ) } . ?l rdf:type ?b } } } . FILTER ( ?v > ?z ) }
[]
human common name art genre
SYSTEM
16
Q21856809 Q22073388 Q26318263 Q22670282 Q26706171 Q5712848 Q18688281 Q22677763 Q27087718 Q22670323 Q26317896 Q315569 Q26709687 Q18579186 Q22677734 Q26668969
(c(Q1792379),P180,c(Q5)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P180
type Q1792379
type Q5
action find_tuple_counts
relation P180
type Q1792379
type Q502895
action count
action filter_multi_types
action find
entity Q18353841
relation P180
type Q5
type Q502895
[ANSWER]
[{'concept': 'Q1792379'}, 'P180', [{'concept': 'Q5'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?m ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?e ) AS ?v ) ?m WHERE { VALUES ( ?t ) { ( ontology:Q502895 ) ( ontology:Q5 ) } . ?e rdf:type ?t } GROUP BY ?m } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?z ) WHERE { resource:Q18353841 property:P180 ?l . { VALUES ( ?b ) { ( ontology:Q5 ) ( ontology:Q502895 ) } . ?l rdf:type ?b } } } . FILTER ( ?v > ?z ) }
Selim Palmgren Henry M. Jackson Bust of Edward VII Crying girl Sir Austen Henry Layard Self-Portrait with Monkey Portrait of A.S.Pushkin Statue of Risto Ryti Bust Of Sir Henry Tate, Outside Tate Library, Brixton Oval JUHANA III - The king of Sweden 1568-1592 -relief Monument To John Heminge And Henry Condell In Former Churchyard Of Church Of St Mary Aldermanbury Karl Marx Monument Antoine Coypel Petrus Franciscus Greive (1811-1872) Statue of Duke John Bust Of Sir Joseph Paxton At Crystal Palace Park
16
action count
action greater
action union
action find_tuple_counts
relation depicts
type art genre
type human
action find_tuple_counts
relation depicts
type art genre
type common name
action count
action filter_multi_types
action find
entity Architectural painting
relation depicts
type human
type common name
[{'concept': 'art genre'}, 'depicts', [{'concept': 'human'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?m ) AS ?d ) WHERE { { SELECT DISTINCT ( COUNT ( ?e ) AS ?v ) ?m WHERE { VALUES ( ?t ) { ( ontology:common_name ) ( ontology:human ) } . ?e rdf:type ?t } GROUP BY ?m } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?z ) WHERE { resource:Architectural_painting property:depicts ?l . { VALUES ( ?b ) { ( ontology:human ) ( ontology:common_name ) } . ?l rdf:type ?b } } } . FILTER ( ?v > ?z ) }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type|Incomplete
Q214127
P180
Q5 Q502895 Q1792379
USER
And what about genre painting?
(c(Q1792379),P180,c(Q5)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P180
type Q1792379
type Q5
action find_tuple_counts
relation P180
type Q1792379
type Q502895
action count
action filter_multi_types
action find
entity Q214127
relation P180
type Q5
type Q502895
[{'concept': 'Q1792379'}, 'P180', [{'concept': 'Q5'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?z ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?p ) AS ?v ) ?z WHERE { { ?z rdf:type ontology:Q1792379 . ?p rdf:type ontology:Q502895 . ?z property:P180 ?p } UNION { ?z property:P180 ?p . ?z rdf:type ontology:Q1792379 . ?p rdf:type ontology:Q5 } } GROUP BY ?z } . FILTER ( ?v > ?q ) . { SELECT DISTINCT ( COUNT ( ?x ) AS ?q ) WHERE { resource:Q214127 property:P180 ?x . { { ?x rdf:type ontology:Q5 } UNION { ?x rdf:type ontology:Q502895 } } } } }
genre painting
action count
action greater
action union
action find_tuple_counts
relation depicts
type art genre
type human
action find_tuple_counts
relation depicts
type art genre
type common name
action count
action filter_multi_types
action find
entity genre painting
relation depicts
type human
type common name
[{'concept': 'art genre'}, 'depicts', [{'concept': 'human'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?z ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?p ) AS ?v ) ?z WHERE { { ?z rdf:type ontology:art_genre . ?p rdf:type ontology:common_name . ?z property:depicts ?p } UNION { ?z property:depicts ?p . ?z rdf:type ontology:art_genre . ?p rdf:type ontology:human } } GROUP BY ?z } . FILTER ( ?v > ?q ) . { SELECT DISTINCT ( COUNT ( ?x ) AS ?q ) WHERE { resource:genre_painting property:depicts ?x . { { ?x rdf:type ontology:human } UNION { ?x rdf:type ontology:common_name } } } } }
[]
human common name art genre
SYSTEM
16
Q21856809 Q22073388 Q26318263 Q22670282 Q26706171 Q5712848 Q18688281 Q22677763 Q27087718 Q22670323 Q26317896 Q315569 Q26709687 Q18579186 Q22677734 Q26668969
(c(Q1792379),P180,c(Q5)|c(Q502895))
action count
action greater
action union
action find_tuple_counts
relation P180
type Q1792379
type Q5
action find_tuple_counts
relation P180
type Q1792379
type Q502895
action count
action filter_multi_types
action find
entity Q214127
relation P180
type Q5
type Q502895
[ANSWER]
[{'concept': 'Q1792379'}, 'P180', [{'concept': 'Q5'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ( COUNT ( ?z ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?p ) AS ?v ) ?z WHERE { { ?z rdf:type ontology:Q1792379 . ?p rdf:type ontology:Q502895 . ?z property:P180 ?p } UNION { ?z property:P180 ?p . ?z rdf:type ontology:Q1792379 . ?p rdf:type ontology:Q5 } } GROUP BY ?z } . FILTER ( ?v > ?q ) . { SELECT DISTINCT ( COUNT ( ?x ) AS ?q ) WHERE { resource:Q214127 property:P180 ?x . { { ?x rdf:type ontology:Q5 } UNION { ?x rdf:type ontology:Q502895 } } } } }
Selim Palmgren Henry M. Jackson Bust of Edward VII Crying girl Sir Austen Henry Layard Self-Portrait with Monkey Portrait of A.S.Pushkin Statue of Risto Ryti Bust Of Sir Henry Tate, Outside Tate Library, Brixton Oval JUHANA III - The king of Sweden 1568-1592 -relief Monument To John Heminge And Henry Condell In Former Churchyard Of Church Of St Mary Aldermanbury Karl Marx Monument Antoine Coypel Petrus Franciscus Greive (1811-1872) Statue of Duke John Bust Of Sir Joseph Paxton At Crystal Palace Park
16
action count
action greater
action union
action find_tuple_counts
relation depicts
type art genre
type human
action find_tuple_counts
relation depicts
type art genre
type common name
action count
action filter_multi_types
action find
entity genre painting
relation depicts
type human
type common name
[{'concept': 'art genre'}, 'depicts', [{'concept': 'human'}, {'concept': 'common name'}]]
SELECT DISTINCT ( COUNT ( ?z ) AS ?j ) WHERE { { SELECT DISTINCT ( COUNT ( ?p ) AS ?v ) ?z WHERE { { ?z rdf:type ontology:art_genre . ?p rdf:type ontology:common_name . ?z property:depicts ?p } UNION { ?z property:depicts ?p . ?z rdf:type ontology:art_genre . ?p rdf:type ontology:human } } GROUP BY ?z } . FILTER ( ?v > ?q ) . { SELECT DISTINCT ( COUNT ( ?x ) AS ?q ) WHERE { resource:genre_painting property:depicts ?x . { { ?x rdf:type ontology:human } UNION { ?x rdf:type ontology:common_name } } } } }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q51490
P58
Q838948
USER
Which works of art are George Stevens a screwriter of ?
(c(Q838948),P58,Q51490)
action filter_type
action find_reverse
entity Q51490
relation P58
type Q838948
[{'concept': 'Q838948'}, 'P58', 'Q51490']
SELECT DISTINCT ?l WHERE { ?l property:P58 resource:Q51490 . ?l rdf:type ontology:Q838948 }
George Stevens
action filter_type
action find_reverse
entity George Stevens
relation screenwriter
type work of art
[{'concept': 'work of art'}, 'screenwriter', 'George Stevens']
SELECT DISTINCT ?l WHERE { ?l property:screenwriter resource:George_Stevens . ?l rdf:type ontology:work_of_art }
[]
work of art
Q1218601 Q3218820
SYSTEM
The Greatest Story Ever Told, Roughest Africa
Q1218601 Q3218820
(c(Q838948),P58,Q51490)
action filter_type
action find_reverse
entity Q51490
relation P58
type Q838948
The Greatest Story Ever told and Roughest Africa are George Stevens a screwriter of
[{'concept': 'Q838948'}, 'P58', 'Q51490']
SELECT DISTINCT ?l WHERE { ?l property:P58 resource:Q51490 . ?l rdf:type ontology:Q838948 }
The Greatest Story Ever Told Roughest Africa
The Greatest Story Ever told and Roughest Africa are George Stevens a screwriter of
The Greatest Story Ever Told Roughest Africa
action filter_type
action find_reverse
entity George Stevens
relation screenwriter
type work of art
[{'concept': 'work of art'}, 'screenwriter', 'George Stevens']
SELECT DISTINCT ?l WHERE { ?l property:screenwriter resource:George_Stevens . ?l rdf:type ontology:work_of_art }
[]
Clarification
Simple Question|Single Entity|Indirect
Q3218820
P162
Q502895
USER
Which person produced that work of art ?
(Q3218820,P162,c(Q502895))
action filter_type
action find
entity Q3218820
relation P162
type Q502895
['Q3218820', 'P162', {'concept': 'Q502895'}]
SELECT DISTINCT ?z WHERE { resource:Q3218820 property:P162 ?z . ?z rdf:type ontology:Q502895 }
Roughest Africa
action filter_type
action find
entity Roughest Africa
relation producer
type common name
['Roughest Africa', 'producer', {'concept': 'common name'}]
SELECT DISTINCT ?z WHERE { resource:Roughest_Africa property:producer ?z . ?z rdf:type ontology:common_name }
[]
common name
Clarification for simple ques.
Q3218820
SYSTEM
Did you mean Roughest Africa ?
Q1218601 Q3218820
(Q1218601,P162,c(Q502895)) (Q3218820,P162,c(Q502895))
[ANSWER]
['Q1218601', 'P162', {'concept': 'Q502895'}] ['Q3218820', 'P162', {'concept': 'Q502895'}]
SELECT DISTINCT ?z WHERE { resource:Q3218820 property:P162 ?z . ?z rdf:type ontology:Q502895 }
The Greatest Story Ever Told Roughest Africa
Did you mean Roughest Africa ?
Roughest Africa
['The Greatest Story Ever Told', 'producer', {'concept': 'common name'}] ['Roughest Africa', 'producer', {'concept': 'common name'}]
SELECT DISTINCT ?z WHERE { resource:Roughest_Africa property:producer ?z . ?z rdf:type ontology:common_name }
[]
Simple Question (Coreferenced)
USER
Yes
(Q3218820,P162,c(Q502895))
['Q3218820', 'P162', {'concept': 'Q502895'}]
['Roughest Africa', 'producer', {'concept': 'common name'}]
[]
Q72792
SYSTEM
Hal Roach
Q72792
(Q3218820,P162,c(Q502895))
action filter_type
action find
entity Q3218820
relation P162
type Q502895
[ANSWER] produced that work of art
['Q3218820', 'P162', {'concept': 'Q502895'}]
SELECT DISTINCT ?z WHERE { resource:Q3218820 property:P162 ?z . ?z rdf:type ontology:Q502895 }
Hal Roach
Hal Roach produced that work of art
Hal Roach
action filter_type
action find
entity Roughest Africa
relation producer
type common name
['Roughest Africa', 'producer', {'concept': 'common name'}]
SELECT DISTINCT ?z WHERE { resource:Roughest_Africa property:producer ?z . ?z rdf:type ontology:common_name }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q7259570 Q3218820
P495
Q15617994
USER
Which administrative territories are the countries of origin of Roughest Africa or Pulp ?
OR((Q3218820,P495,c(Q15617994)), (Q7259570,P495,c(Q15617994)))
action filter_type
action union
action find
entity Q3218820
relation P495
action find
entity Q7259570
relation P495
type Q15617994
{'OR': [['Q3218820', 'P495', {'concept': 'Q15617994'}], ['Q7259570', 'P495', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?v WHERE { { VALUES ( ?y ) { ( resource:Q3218820 ) ( resource:Q7259570 ) } . ?y property:P495 ?v } . ?v rdf:type ontology:Q15617994 }
Pulp Roughest Africa
action filter_type
action union
action find
entity Roughest Africa
relation country of origin
action find
entity Pulp
relation country of origin
type designation for an administrative territorial entity
{'OR': [['Roughest Africa', 'country of origin', {'concept': 'designation for an administrative territorial entity'}], ['Pulp', 'country of origin', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?v WHERE { { VALUES ( ?y ) { ( resource:Roughest_Africa ) ( resource:Pulp ) } . ?y property:country_of_origin ?v } . ?v rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q419 Q30
SYSTEM
Peru, United States of America
Q419 Q30
OR((Q3218820,P495,c(Q15617994)), (Q7259570,P495,c(Q15617994)))
action filter_type
action union
action find
entity Q3218820
relation P495
action find
entity Q7259570
relation P495
type Q15617994
[ANSWERS] are the countries of origin of Roughest Africa or Pulp
{'OR': [['Q3218820', 'P495', {'concept': 'Q15617994'}], ['Q7259570', 'P495', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?v WHERE { { VALUES ( ?y ) { ( resource:Q3218820 ) ( resource:Q7259570 ) } . ?y property:P495 ?v } . ?v rdf:type ontology:Q15617994 }
Peru United States of America
Peru and United States of America are the countries of origin of Roughest Africa or Pulp
Peru United States of America
action filter_type
action union
action find
entity Roughest Africa
relation country of origin
action find
entity Pulp
relation country of origin
type designation for an administrative territorial entity
{'OR': [['Roughest Africa', 'country of origin', {'concept': 'designation for an administrative territorial entity'}], ['Pulp', 'country of origin', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?v WHERE { { VALUES ( ?y ) { ( resource:Roughest_Africa ) ( resource:Pulp ) } . ?y property:country_of_origin ?v } . ?v rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P17
Q15617994 Q486972 Q15617994
USER
Which administrative territories do max number of human settlements or administrative territories belong to ?
(c(Q486972)|c(Q15617994),P17,c(Q15617994))
action argmax
action union
action find_reverse_tuple_counts
relation P17
type Q15617994
type Q486972
action find_reverse_tuple_counts
relation P17
type Q15617994
type Q15617994
[[{'concept': 'Q486972'}, {'concept': 'Q15617994'}], 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ?u ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?j . VALUES ( ?j ) { ( ontology:Q486972 ) ( ontology:Q15617994 ) } } GROUP BY ?u } . FILTER ( ?v = ?n ) . { SELECT DISTINCT ( MAX ( ?d ) AS ?n ) { SELECT DISTINCT ?q ( COUNT ( ?g ) AS ?d ) WHERE { { ?g property:P17 ?q . ?q rdf:type ontology:Q15617994 . ?g rdf:type ontology:Q486972 } UNION { ?g property:P17 ?q . ?q rdf:type ontology:Q15617994 . ?g rdf:type ontology:Q15617994 } } GROUP BY ?q } } }
action argmax
action union
action find_reverse_tuple_counts
relation country
type designation for an administrative territorial entity
type human settlement
action find_reverse_tuple_counts
relation country
type designation for an administrative territorial entity
type designation for an administrative territorial entity
[[{'concept': 'human settlement'}, {'concept': 'designation for an administrative territorial entity'}], 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ?u ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?j . VALUES ( ?j ) { ( ontology:human_settlement ) ( ontology:designation_for_an_administrative_territorial_entity ) } } GROUP BY ?u } . FILTER ( ?v = ?n ) . { SELECT DISTINCT ( MAX ( ?d ) AS ?n ) { SELECT DISTINCT ?q ( COUNT ( ?g ) AS ?d ) WHERE { { ?g property:country ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity . ?g rdf:type ontology:human_settlement } UNION { ?g property:country ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity . ?g rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?q } } }
[]
designation for an administrative territorial entity human settlement designation for an administrative territorial entity
Q36
SYSTEM
Poland
Q36
(c(Q486972)|c(Q15617994),P17,c(Q15617994))
action argmax
action union
action find_reverse_tuple_counts
relation P17
type Q15617994
type Q486972
action find_reverse_tuple_counts
relation P17
type Q15617994
type Q15617994
[ANSWER] max number of human settlements or administrative territories belong to
[[{'concept': 'Q486972'}, {'concept': 'Q15617994'}], 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ?u ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?j . VALUES ( ?j ) { ( ontology:Q486972 ) ( ontology:Q15617994 ) } } GROUP BY ?u } . FILTER ( ?v = ?n ) . { SELECT DISTINCT ( MAX ( ?d ) AS ?n ) { SELECT DISTINCT ?q ( COUNT ( ?g ) AS ?d ) WHERE { { ?g property:P17 ?q . ?q rdf:type ontology:Q15617994 . ?g rdf:type ontology:Q486972 } UNION { ?g property:P17 ?q . ?q rdf:type ontology:Q15617994 . ?g rdf:type ontology:Q15617994 } } GROUP BY ?q } } }
Poland
Poland max number of human settlements or administrative territories belong to
Poland
action argmax
action union
action find_reverse_tuple_counts
relation country
type designation for an administrative territorial entity
type human settlement
action find_reverse_tuple_counts
relation country
type designation for an administrative territorial entity
type designation for an administrative territorial entity
[[{'concept': 'human settlement'}, {'concept': 'designation for an administrative territorial entity'}], 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?u WHERE { { SELECT DISTINCT ?u ( COUNT ( ?y ) AS ?v ) WHERE { ?y rdf:type ?j . VALUES ( ?j ) { ( ontology:human_settlement ) ( ontology:designation_for_an_administrative_territorial_entity ) } } GROUP BY ?u } . FILTER ( ?v = ?n ) . { SELECT DISTINCT ( MAX ( ?d ) AS ?n ) { SELECT DISTINCT ?q ( COUNT ( ?g ) AS ?d ) WHERE { { ?g property:country ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity . ?g rdf:type ontology:human_settlement } UNION { ?g property:country ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity . ?g rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?q } } }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q3548431 Q1218601
P161 P344
Q502895
USER
Which people are the director of photography for The Greatest Story Ever Told or starred in A Certain Smile ?
OR((Q1218601,P344,c(Q502895)), (Q3548431,P161,c(Q502895)))
action filter_type
action union
action find
entity Q1218601
relation P344
action find
entity Q3548431
relation P161
type Q502895
{'OR': [['Q1218601', 'P344', {'concept': 'Q502895'}], ['Q3548431', 'P161', {'concept': 'Q502895'}]]}
SELECT DISTINCT ?j WHERE { { { resource:Q1218601 property:P344 ?j } UNION { resource:Q3548431 property:P161 ?j } } . ?j rdf:type ontology:Q502895 }
A Certain Smile The Greatest Story Ever Told
action filter_type
action union
action find
entity The Greatest Story Ever Told
relation director of photography
action find
entity A Certain Smile
relation cast member
type common name
{'OR': [['The Greatest Story Ever Told', 'director of photography', {'concept': 'common name'}], ['A Certain Smile', 'cast member', {'concept': 'common name'}]]}
SELECT DISTINCT ?j WHERE { { { resource:The_Greatest_Story_Ever_Told property:director_of_photography ?j } UNION { resource:A_Certain_Smile property:cast_member ?j } } . ?j rdf:type ontology:common_name }
[]
common name
Q896953 Q1574071 Q568941 Q1667630 Q362210 Q281048 Q1040798 Q95076 Q449612
SYSTEM
Bradford Dillman, Christine Carère, Loyal Griggs, Steven Geray, William C. Mellor, Eduard Franz, Rossano Brazzi, Joan Fontaine, Johnny Mathis
Q896953 Q1574071 Q568941 Q1667630 Q362210 Q281048 Q1040798 Q95076 Q449612
OR((Q1218601,P344,c(Q502895)), (Q3548431,P161,c(Q502895)))
action filter_type
action union
action find
entity Q1218601
relation P344
action find
entity Q3548431
relation P161
type Q502895
[ANSWERS] are the director of photography for The Greatest Story Ever Told or starred in A Certain Smile
{'OR': [['Q1218601', 'P344', {'concept': 'Q502895'}], ['Q3548431', 'P161', {'concept': 'Q502895'}]]}
SELECT DISTINCT ?j WHERE { { { resource:Q1218601 property:P344 ?j } UNION { resource:Q3548431 property:P161 ?j } } . ?j rdf:type ontology:Q502895 }
Bradford Dillman Christine Carère Loyal Griggs Steven Geray William C. Mellor Eduard Franz Rossano Brazzi Joan Fontaine Johnny Mathis
Bradford Dillman, Christine Carère, Loyal Griggs, Steven Geray, William C. Mellor, Eduard Franz, Rossano Brazzi, Joan Fontaine and Johnny Mathis are the director of photography for The Greatest Story Ever Told or starred in A Certain Smile
Bradford Dillman Christine Carère Loyal Griggs Steven Geray William C. Mellor Eduard Franz Rossano Brazzi Joan Fontaine Johnny Mathis
action filter_type
action union
action find
entity The Greatest Story Ever Told
relation director of photography
action find
entity A Certain Smile
relation cast member
type common name
{'OR': [['The Greatest Story Ever Told', 'director of photography', {'concept': 'common name'}], ['A Certain Smile', 'cast member', {'concept': 'common name'}]]}
SELECT DISTINCT ?j WHERE { { { resource:The_Greatest_Story_Ever_Told property:director_of_photography ?j } UNION { resource:A_Certain_Smile property:cast_member ?j } } . ?j rdf:type ontology:common_name }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count over Atleast/ Atmost/ Approx. the same/Equal|Single entity type
P1303
Q34379 Q502895
USER
How many musical instruments do around 3097 people know to play ?
(c(Q502895),P1303,c(Q34379))
action count
action approx
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
value 3097
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ( COUNT ( ?d ) AS ?y ) WHERE { { SELECT DISTINCT ?d ( COUNT ( ?g ) AS ?c ) WHERE { ?g property:P1303 ?d . ?d rdf:type ontology:Q34379 . ?g rdf:type ontology:Q502895 } GROUP BY ?d } . FILTER ( ?c = 3097 ) }
action count
action approx
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
value 3097
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ( COUNT ( ?d ) AS ?y ) WHERE { { SELECT DISTINCT ?d ( COUNT ( ?g ) AS ?c ) WHERE { ?g property:instrument ?d . ?d rdf:type ontology:musical_instrument . ?g rdf:type ontology:common_name } GROUP BY ?d } . FILTER ( ?c = 3097 ) }
[]
musical instrument common name
SYSTEM
3
Q8355 Q1444 Q128309
(c(Q502895),P1303,c(Q34379))
action count
action approx
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
value 3097
[ANSWER]
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ( COUNT ( ?d ) AS ?y ) WHERE { { SELECT DISTINCT ?d ( COUNT ( ?g ) AS ?c ) WHERE { ?g property:P1303 ?d . ?d rdf:type ontology:Q34379 . ?g rdf:type ontology:Q502895 } GROUP BY ?d } . FILTER ( ?c = 3097 ) }
violin organ drum kit
3
action count
action approx
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
value 3097
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ( COUNT ( ?d ) AS ?y ) WHERE { { SELECT DISTINCT ?d ( COUNT ( ?g ) AS ?c ) WHERE { ?g property:instrument ?d . ?d rdf:type ontology:musical_instrument . ?g rdf:type ontology:common_name } GROUP BY ?d } . FILTER ( ?c = 3097 ) }
[]