Simple Question (Direct)
Simple Question
Q5728224
P40
Q502895
USER
Who is a child of Henry Seymour ?
(Q5728224,P40,c(Q502895))
action filter_type
action find
entity Q5728224
relation P40
type Q502895
['Q5728224', 'P40', {'concept': 'Q502895'}]
SELECT DISTINCT ?s WHERE { resource:Q5728224 property:P40 ?s . ?s rdf:type ontology:Q502895 }
Henry Seymour
action filter_type
action find
entity Henry Seymour
relation child
type common name
['Henry Seymour', 'child', {'concept': 'common name'}]
SELECT DISTINCT ?s WHERE { resource:Henry_Seymour property:child ?s . ?s rdf:type ontology:common_name }
[]
common name
Q5728218
SYSTEM
Henry Seymour
Q5728218
(Q5728224,P40,c(Q502895))
action filter_type
action find
entity Q5728224
relation P40
type Q502895
A child of [ANSWER] is of [ANSWER]
['Q5728224', 'P40', {'concept': 'Q502895'}]
SELECT DISTINCT ?s WHERE { resource:Q5728224 property:P40 ?s . ?s rdf:type ontology:Q502895 }
Henry Seymour
A child of Henry Seymour is of Henry Seymour
Henry Seymour
action filter_type
action find
entity Henry Seymour
relation child
type common name
['Henry Seymour', 'child', {'concept': 'common name'}]
SELECT DISTINCT ?s WHERE { resource:Henry_Seymour property:child ?s . ?s rdf:type ontology:common_name }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q5728218
P22
Q502895
USER
Who was the dad of that one ?
(Q5728218,P22,c(Q502895))
action filter_type
action find
entity Q5728218
relation P22
type Q502895
['Q5728218', 'P22', {'concept': 'Q502895'}]
SELECT DISTINCT ?y WHERE { resource:Q5728218 property:P22 ?y . ?y rdf:type ontology:Q502895 }
Henry Seymour
action filter_type
action find
entity Henry Seymour
relation father
type common name
['Henry Seymour', 'father', {'concept': 'common name'}]
SELECT DISTINCT ?y WHERE { resource:Henry_Seymour property:father ?y . ?y rdf:type ontology:common_name }
[]
common name
Q5728224
SYSTEM
Henry Seymour
Q5728224
(Q5728218,P22,c(Q502895))
action filter_type
action find
entity Q5728218
relation P22
type Q502895
The dad of that one was Lord [ANSWER]
['Q5728218', 'P22', {'concept': 'Q502895'}]
SELECT DISTINCT ?y WHERE { resource:Q5728218 property:P22 ?y . ?y rdf:type ontology:Q502895 }
Henry Seymour
The dad of that one was Lord Henry Seymour
Henry Seymour
action filter_type
action find
entity Henry Seymour
relation father
type common name
['Henry Seymour', 'father', {'concept': 'common name'}]
SELECT DISTINCT ?y WHERE { resource:Henry_Seymour property:father ?y . ?y rdf:type ontology:common_name }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P248
Q35749 Q1752346 Q502895
USER
Which people have been stated in max number of parliaments or assemblies ?
(c(Q502895),P248,c(Q35749)|c(Q1752346))
action argmax
action union
action find_tuple_counts
relation P248
type Q502895
type Q35749
action find_tuple_counts
relation P248
type Q502895
type Q1752346
[{'concept': 'Q502895'}, 'P248', [{'concept': 'Q35749'}, {'concept': 'Q1752346'}]]
SELECT DISTINCT ?r WHERE { { SELECT DISTINCT ( MAX ( ?h ) AS ?t ) { SELECT DISTINCT ?l ( COUNT ( ?d ) AS ?h ) WHERE { { ?l property:P248 ?d . ?l rdf:type ontology:Q502895 . ?d rdf:type ontology:Q1752346 } UNION { ?l rdf:type ontology:Q502895 . ?d rdf:type ontology:Q35749 . ?l property:P248 ?d } } GROUP BY ?l } } . { SELECT DISTINCT ?r ( COUNT ( ?s ) AS ?c ) WHERE { { ?r property:P248 ?s . ?r rdf:type ontology:Q502895 . ?s rdf:type ontology:Q35749 } UNION { ?r property:P248 ?s . ?r rdf:type ontology:Q502895 . ?s rdf:type ontology:Q1752346 } } GROUP BY ?r } . FILTER ( ?c = ?t ) }
action argmax
action union
action find_tuple_counts
relation stated in
type common name
type parliament
action find_tuple_counts
relation stated in
type common name
type assembly
[{'concept': 'common name'}, 'stated in', [{'concept': 'parliament'}, {'concept': 'assembly'}]]
SELECT DISTINCT ?r WHERE { { SELECT DISTINCT ( MAX ( ?h ) AS ?t ) { SELECT DISTINCT ?l ( COUNT ( ?d ) AS ?h ) WHERE { { ?l property:stated_in ?d . ?l rdf:type ontology:common_name . ?d rdf:type ontology:assembly } UNION { ?l rdf:type ontology:common_name . ?d rdf:type ontology:parliament . ?l property:stated_in ?d } } GROUP BY ?l } } . { SELECT DISTINCT ?r ( COUNT ( ?s ) AS ?c ) WHERE { { ?r property:stated_in ?s . ?r rdf:type ontology:common_name . ?s rdf:type ontology:parliament } UNION { ?r property:stated_in ?s . ?r rdf:type ontology:common_name . ?s rdf:type ontology:assembly } } GROUP BY ?r } . FILTER ( ?c = ?t ) }
[]
parliament assembly common name
Q5606262 Q6228730 Q5239885
SYSTEM
Greg Smith, John Davies, David Smith
Q5606264 Q5606262 Q11035229 Q6249873 Q15999511 Q16059754 Q17626521 Q8020387 Q16031816 Q6228730 Q6237308 Q18166520 Q5239885 Q17385895 Q6262700
(c(Q502895),P248,c(Q35749)|c(Q1752346))
action argmax
action union
action find_tuple_counts
relation P248
type Q502895
type Q35749
action find_tuple_counts
relation P248
type Q502895
type Q1752346
[ANSWERS] have been stated in max number of parliaments or assemblies
[{'concept': 'Q502895'}, 'P248', [{'concept': 'Q35749'}, {'concept': 'Q1752346'}]]
SELECT DISTINCT ?r WHERE { { SELECT DISTINCT ( MAX ( ?h ) AS ?t ) { SELECT DISTINCT ?l ( COUNT ( ?d ) AS ?h ) WHERE { { ?l property:P248 ?d . ?l rdf:type ontology:Q502895 . ?d rdf:type ontology:Q1752346 } UNION { ?l rdf:type ontology:Q502895 . ?d rdf:type ontology:Q35749 . ?l property:P248 ?d } } GROUP BY ?l } } . { SELECT DISTINCT ?r ( COUNT ( ?s ) AS ?c ) WHERE { { ?r property:P248 ?s . ?r rdf:type ontology:Q502895 . ?s rdf:type ontology:Q35749 } UNION { ?r property:P248 ?s . ?r rdf:type ontology:Q502895 . ?s rdf:type ontology:Q1752346 } } GROUP BY ?r } . FILTER ( ?c = ?t ) }
Greg Smith Greg Smith John Carter John Murphy William Robinson James Brown Colin Campbell William Williams William Walker John Davies John Hall William Thompson David Smith David Evans John Walker
Greg Smith, John Davies and David Smith have been stated in max number of parliaments or assemblies
Greg Smith John Davies David Smith
action argmax
action union
action find_tuple_counts
relation stated in
type common name
type parliament
action find_tuple_counts
relation stated in
type common name
type assembly
[{'concept': 'common name'}, 'stated in', [{'concept': 'parliament'}, {'concept': 'assembly'}]]
SELECT DISTINCT ?r WHERE { { SELECT DISTINCT ( MAX ( ?h ) AS ?t ) { SELECT DISTINCT ?l ( COUNT ( ?d ) AS ?h ) WHERE { { ?l property:stated_in ?d . ?l rdf:type ontology:common_name . ?d rdf:type ontology:assembly } UNION { ?l rdf:type ontology:common_name . ?d rdf:type ontology:parliament . ?l property:stated_in ?d } } GROUP BY ?l } } . { SELECT DISTINCT ?r ( COUNT ( ?s ) AS ?c ) WHERE { { ?r property:stated_in ?s . ?r rdf:type ontology:common_name . ?s rdf:type ontology:parliament } UNION { ?r property:stated_in ?s . ?r rdf:type ontology:common_name . ?s rdf:type ontology:assembly } } GROUP BY ?r } . FILTER ( ?c = ?t ) }
[]