Simple Question (Direct)
Simple Question
Q5931086
P161
Q502895
USER
Who were casted in Hugh Hefner: Playboy, Activist and Rebel ?
(Q5931086,P161,c(Q502895))
action filter_type
action find
entity Q5931086
relation P161
type Q502895
['Q5931086', 'P161', {'concept': 'Q502895'}]
SELECT DISTINCT ?h WHERE { ?h rdf:type ontology:Q502895 . resource:Q5931086 property:P161 ?h }
Hugh Hefner: Playboy, Activist and Rebel
action filter_type
action find
entity Hugh Hefner: Playboy, Activist and Rebel
relation cast member
type common name
['Hugh Hefner: Playboy, Activist and Rebel', 'cast member', {'concept': 'common name'}]
SELECT DISTINCT ?h WHERE { ?h rdf:type ontology:common_name . resource:Hugh_Hefner:_Playboy,_Activist_and_Rebel property:cast_member ?h }
[]
common name
Q194280 Q230993 Q77688
SYSTEM
Hugh Hefner, Jenny McCarthy, Ruth Westheimer
Q236409 Q77688 Q230993 Q375356 Q194280
(Q5931086,P161,c(Q502895))
action filter_type
action find
entity Q5931086
relation P161
type Q502895
[ANSWERS] were casted in Hugh Hefner: Playboy, Activist and Rebel
['Q5931086', 'P161', {'concept': 'Q502895'}]
SELECT DISTINCT ?h WHERE { ?h rdf:type ontology:Q502895 . resource:Q5931086 property:P161 ?h }
Shanon Tweed Ruth Westheimer Jenny McCarthy Dick Cavett Hugh Hefner
Hugh Hefner, Jenny McCarthy and Ruth Westheimer were casted in Hugh Hefner: Playboy, Activist and Rebel
Hugh Hefner Jenny McCarthy Ruth Westheimer
action filter_type
action find
entity Hugh Hefner: Playboy, Activist and Rebel
relation cast member
type common name
['Hugh Hefner: Playboy, Activist and Rebel', 'cast member', {'concept': 'common name'}]
SELECT DISTINCT ?h WHERE { ?h rdf:type ontology:common_name . resource:Hugh_Hefner:_Playboy,_Activist_and_Rebel property:cast_member ?h }
[]
Simple Question (Direct)
Simple Question|Mult. Entity|Indirect
Q194280 Q230993 Q77688
P161
Q838948
USER
Which works of art have Hugh Hefner, Jenny McCarthy and Ruth Westheimer as actor ?
(c(Q838948),P161,Q194280) (c(Q838948),P161,Q230993) (c(Q838948),P161,Q77688)
action union
action filter_type
action find_reverse
entity Q194280
relation P161
type Q838948
action filter_type
action find_reverse
entity Q230993
relation P161
type Q838948
action filter_type
action find_reverse
entity Q77688
relation P161
type Q838948
[{'concept': 'Q838948'}, 'P161', 'Q194280'] [{'concept': 'Q838948'}, 'P161', 'Q230993'] [{'concept': 'Q838948'}, 'P161', 'Q77688']
SELECT DISTINCT ?j WHERE { VALUES ( ?y ) { ( resource:Q194280 ) ( resource:Q230993 ) } . ?j property:P161 ?y }
Hugh Hefner Jenny McCarthy Ruth Westheimer
action union
action filter_type
action find_reverse
entity Hugh Hefner
relation cast member
type work of art
action filter_type
action find_reverse
entity Jenny McCarthy
relation cast member
type work of art
action filter_type
action find_reverse
entity Ruth Westheimer
relation cast member
type work of art
[{'concept': 'work of art'}, 'cast member', 'Hugh Hefner'] [{'concept': 'work of art'}, 'cast member', 'Jenny McCarthy'] [{'concept': 'work of art'}, 'cast member', 'Ruth Westheimer']
SELECT DISTINCT ?j WHERE { VALUES ( ?y ) { ( resource:Hugh_Hefner ) ( resource:Jenny_McCarthy ) } . ?j property:cast_member ?y }
[]
work of art
Q635937 Q391784 Q525860
SYSTEM
Scary Movie 3, Scream 3, Beverly Hills Cop II
Q466959 Q5931086 Q525860 Q1440375 Q475136 Q1664537 Q1471230 Q3490545 Q771023 Q5183188 Q635937 Q266027 Q5931086 Q876851 Q391784 Q4019703 Q1755269 Q8028358 Q5931086
(c(Q838948),P161,Q194280) (c(Q838948),P161,Q230993) (c(Q838948),P161,Q77688)
action union
action filter_type
action find_reverse
entity Q194280
relation P161
type Q838948
action filter_type
action find_reverse
entity Q230993
relation P161
type Q838948
action filter_type
action find_reverse
entity Q77688
relation P161
type Q838948
[ANSWERS] have Hugh Hefner, Jenny McCarthy and Ruth Westheimer as actor
[{'concept': 'Q838948'}, 'P161', 'Q194280'] [{'concept': 'Q838948'}, 'P161', 'Q230993'] [{'concept': 'Q838948'}, 'P161', 'Q77688']
SELECT DISTINCT ?j WHERE { VALUES ( ?y ) { ( resource:Q194280 ) ( resource:Q230993 ) } . ?j property:P161 ?y }
The House Bunny Hugh Hefner: Playboy, Activist and Rebel Beverly Hills Cop II Roman Polanski: Wanted and Desired Miss March Inside Deep Throat History of the World, Part I The Stupids John Tucker Must Die Crazy Little Thing Scary Movie 3 BASEketball Hugh Hefner: Playboy, Activist and Rebel Diamonds Scream 3 Wieners Dirty Love Witless Protection Hugh Hefner: Playboy, Activist and Rebel
Scary Movie 3, Scream 3 and Beverly Hills Cop II have Hugh Hefner, Jenny McCarthy and Ruth Westheimer as actor
Scary Movie 3 Scream 3 Beverly Hills Cop II
action union
action filter_type
action find_reverse
entity Hugh Hefner
relation cast member
type work of art
action filter_type
action find_reverse
entity Jenny McCarthy
relation cast member
type work of art
action filter_type
action find_reverse
entity Ruth Westheimer
relation cast member
type work of art
[{'concept': 'work of art'}, 'cast member', 'Hugh Hefner'] [{'concept': 'work of art'}, 'cast member', 'Jenny McCarthy'] [{'concept': 'work of art'}, 'cast member', 'Ruth Westheimer']
SELECT DISTINCT ?j WHERE { VALUES ( ?y ) { ( resource:Hugh_Hefner ) ( resource:Jenny_McCarthy ) } . ?j property:cast_member ?y }
[]
Clarification
Simple Question|Single Entity|Indirect
Q194280
P26
Q502895
USER
Who are married to that one ?
(Q194280,P26,c(Q502895))
action filter_type
action find
entity Q194280
relation P26
type Q502895
['Q194280', 'P26', {'concept': 'Q502895'}]
SELECT DISTINCT ?m WHERE { resource:Q194280 property:P26 ?m . ?m rdf:type ontology:Q502895 }
Hugh Hefner
action filter_type
action find
entity Hugh Hefner
relation spouse
type common name
['Hugh Hefner', 'spouse', {'concept': 'common name'}]
SELECT DISTINCT ?m WHERE { resource:Hugh_Hefner property:spouse ?m . ?m rdf:type ontology:common_name }
[]
common name
Clarification for simple ques.
Q194280
SYSTEM
Did you mean Hugh Hefner ?
Q635937 Q391784 Q525860
(Q635937,P26,c(Q502895)) (Q391784,P26,c(Q502895)) (Q525860,P26,c(Q502895))
[ANSWER]
['Q635937', 'P26', {'concept': 'Q502895'}] ['Q391784', 'P26', {'concept': 'Q502895'}] ['Q525860', 'P26', {'concept': 'Q502895'}]
SELECT DISTINCT ?m WHERE { resource:Q194280 property:P26 ?m . ?m rdf:type ontology:Q502895 }
Scary Movie 3 Scream 3 Beverly Hills Cop II
Did you mean Hugh Hefner ?
Hugh Hefner
['Scary Movie 3', 'spouse', {'concept': 'common name'}] ['Scream 3', 'spouse', {'concept': 'common name'}] ['Beverly Hills Cop II', 'spouse', {'concept': 'common name'}]
SELECT DISTINCT ?m WHERE { resource:Hugh_Hefner property:spouse ?m . ?m rdf:type ontology:common_name }
[]
Simple Question (Coreferenced)
USER
Yes
(Q194280,P26,c(Q502895))
['Q194280', 'P26', {'concept': 'Q502895'}]
['Hugh Hefner', 'spouse', {'concept': 'common name'}]
[]
Q3073238 Q454813
SYSTEM
Kimberley Conrad, Crystal Harris
Q3073238 Q454813
(Q194280,P26,c(Q502895))
action filter_type
action find
entity Q194280
relation P26
type Q502895
And [ANSWERS] are married to that one
['Q194280', 'P26', {'concept': 'Q502895'}]
SELECT DISTINCT ?m WHERE { resource:Q194280 property:P26 ?m . ?m rdf:type ontology:Q502895 }
Kimberley Conrad Crystal Harris
And Kimberley Conrad and Crystal Harris are married to that one
Kimberley Conrad Crystal Harris
action filter_type
action find
entity Hugh Hefner
relation spouse
type common name
['Hugh Hefner', 'spouse', {'concept': 'common name'}]
SELECT DISTINCT ?m WHERE { resource:Hugh_Hefner property:spouse ?m . ?m rdf:type ontology:common_name }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count over Atleast/ Atmost/ Approx. the same/Equal|Mult. entity type
P88
Q15617994 Q56061 Q838948
USER
How many works of art were approved by around 1 administrative territories or administrative territories ?
(c(Q838948),P88,c(Q15617994)|c(Q56061))
action count
action approx
action union
action find_tuple_counts
relation P88
type Q838948
type Q15617994
action find_tuple_counts
relation P88
type Q838948
type Q56061
value 1
[{'concept': 'Q838948'}, 'P88', [{'concept': 'Q15617994'}, {'concept': 'Q56061'}]]
SELECT DISTINCT ( COUNT ( ?d ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) ?d WHERE { { ?w rdf:type ontology:Q56061 . ?d rdf:type ontology:Q838948 . ?d property:P88 ?w } UNION { ?d rdf:type ontology:Q838948 . ?w rdf:type ontology:Q15617994 . ?d property:P88 ?w } } GROUP BY ?d } . FILTER ( ?q = 1 ) }
action count
action approx
action union
action find_tuple_counts
relation commissioned by
type work of art
type designation for an administrative territorial entity
action find_tuple_counts
relation commissioned by
type work of art
type administrative territorial entity
value 1
[{'concept': 'work of art'}, 'commissioned by', [{'concept': 'designation for an administrative territorial entity'}, {'concept': 'administrative territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?d ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) ?d WHERE { { ?w rdf:type ontology:administrative_territorial_entity . ?d rdf:type ontology:work_of_art . ?d property:commissioned_by ?w } UNION { ?d rdf:type ontology:work_of_art . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity . ?d property:commissioned_by ?w } } GROUP BY ?d } . FILTER ( ?q = 1 ) }
[]
designation for an administrative territorial entity administrative territorial entity work of art
SYSTEM
7
Q12347248 Q19693349 Q3225815 Q6572993 Q19681517 Q2418237 Q19730417
(c(Q838948),P88,c(Q15617994)|c(Q56061))
action count
action approx
action union
action find_tuple_counts
relation P88
type Q838948
type Q15617994
action find_tuple_counts
relation P88
type Q838948
type Q56061
value 1
[ANSWER]
[{'concept': 'Q838948'}, 'P88', [{'concept': 'Q15617994'}, {'concept': 'Q56061'}]]
SELECT DISTINCT ( COUNT ( ?d ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) ?d WHERE { { ?w rdf:type ontology:Q56061 . ?d rdf:type ontology:Q838948 . ?d property:P88 ?w } UNION { ?d rdf:type ontology:Q838948 . ?w rdf:type ontology:Q15617994 . ?d property:P88 ?w } } GROUP BY ?d } . FILTER ( ?q = 1 ) }
Esperanto memorial Begegnung Le Porteur de viande Amphitrite, the wave and the sea birds Wasserlichtfeldspiegel The Kiss Spiegelfaltung
7
action count
action approx
action union
action find_tuple_counts
relation commissioned by
type work of art
type designation for an administrative territorial entity
action find_tuple_counts
relation commissioned by
type work of art
type administrative territorial entity
value 1
[{'concept': 'work of art'}, 'commissioned by', [{'concept': 'designation for an administrative territorial entity'}, {'concept': 'administrative territorial entity'}]]
SELECT DISTINCT ( COUNT ( ?d ) AS ?e ) WHERE { { SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) ?d WHERE { { ?w rdf:type ontology:administrative_territorial_entity . ?d rdf:type ontology:work_of_art . ?d property:commissioned_by ?w } UNION { ?d rdf:type ontology:work_of_art . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity . ?d property:commissioned_by ?w } } GROUP BY ?d } . FILTER ( ?q = 1 ) }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q4263899 Q3073238
P26
Q502895
USER
Which people are the life partner of Kimberley Conrad or Władysław Litmanowicz ?
OR((c(Q502895),P26,Q3073238), (c(Q502895),P26,Q4263899))
action filter_type
action union
action find_reverse
entity Q3073238
relation P26
action find_reverse
entity Q4263899
relation P26
type Q502895
{'OR': [[{'concept': 'Q502895'}, 'P26', 'Q3073238'], [{'concept': 'Q502895'}, 'P26', 'Q4263899']]}
SELECT DISTINCT ?k WHERE { ?k rdf:type ontology:Q502895 . { ?k property:P26 ?e . VALUES ( ?e ) { ( resource:Q4263899 ) ( resource:Q3073238 ) } } }
Władysław Litmanowicz Kimberley Conrad
action filter_type
action union
action find_reverse
entity Kimberley Conrad
relation spouse
action find_reverse
entity Władysław Litmanowicz
relation spouse
type common name
{'OR': [[{'concept': 'common name'}, 'spouse', 'Kimberley Conrad'], [{'concept': 'common name'}, 'spouse', 'Władysław Litmanowicz']]}
SELECT DISTINCT ?k WHERE { ?k rdf:type ontology:common_name . { ?k property:spouse ?e . VALUES ( ?e ) { ( resource:Władysław_Litmanowicz ) ( resource:Kimberley_Conrad ) } } }
[]
common name
Q194280 Q11781994
SYSTEM
Hugh Hefner, Mirosława Litmanowicz
Q194280 Q11781994
OR((c(Q502895),P26,Q3073238), (c(Q502895),P26,Q4263899))
action filter_type
action union
action find_reverse
entity Q3073238
relation P26
action find_reverse
entity Q4263899
relation P26
type Q502895
[ANSWERS] are the life partner of Kimberley Conrad or Władysław Litmanowicz
{'OR': [[{'concept': 'Q502895'}, 'P26', 'Q3073238'], [{'concept': 'Q502895'}, 'P26', 'Q4263899']]}
SELECT DISTINCT ?k WHERE { ?k rdf:type ontology:Q502895 . { ?k property:P26 ?e . VALUES ( ?e ) { ( resource:Q4263899 ) ( resource:Q3073238 ) } } }
Hugh Hefner Mirosława Litmanowicz
Hugh Hefner and Mirosława Litmanowicz are the life partner of Kimberley Conrad or Władysław Litmanowicz
Hugh Hefner Mirosława Litmanowicz
action filter_type
action union
action find_reverse
entity Kimberley Conrad
relation spouse
action find_reverse
entity Władysław Litmanowicz
relation spouse
type common name
{'OR': [[{'concept': 'common name'}, 'spouse', 'Kimberley Conrad'], [{'concept': 'common name'}, 'spouse', 'Władysław Litmanowicz']]}
SELECT DISTINCT ?k WHERE { ?k rdf:type ontology:common_name . { ?k property:spouse ?e . VALUES ( ?e ) { ( resource:Władysław_Litmanowicz ) ( resource:Kimberley_Conrad ) } } }
[]
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 approximately 3327 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 3327
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ( COUNT ( ?b ) AS ?u ) WHERE { { SELECT DISTINCT ?b ( COUNT ( ?g ) AS ?s ) WHERE { ?b rdf:type ontology:Q34379 . ?g rdf:type ontology:Q502895 . ?g property:P1303 ?b } GROUP BY ?b } . FILTER ( ?s = 3327 ) }
action count
action approx
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
value 3327
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ( COUNT ( ?b ) AS ?u ) WHERE { { SELECT DISTINCT ?b ( COUNT ( ?g ) AS ?s ) WHERE { ?b rdf:type ontology:musical_instrument . ?g rdf:type ontology:common_name . ?g property:instrument ?b } GROUP BY ?b } . FILTER ( ?s = 3327 ) }
[]
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 3327
[ANSWER]
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ( COUNT ( ?b ) AS ?u ) WHERE { { SELECT DISTINCT ?b ( COUNT ( ?g ) AS ?s ) WHERE { ?b rdf:type ontology:Q34379 . ?g rdf:type ontology:Q502895 . ?g property:P1303 ?b } GROUP BY ?b } . FILTER ( ?s = 3327 ) }
violin organ drum kit
3
action count
action approx
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
value 3327
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ( COUNT ( ?b ) AS ?u ) WHERE { { SELECT DISTINCT ?b ( COUNT ( ?g ) AS ?s ) WHERE { ?b rdf:type ontology:musical_instrument . ?g rdf:type ontology:common_name . ?g property:instrument ?b } GROUP BY ?b } . FILTER ( ?s = 3327 ) }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q635937
P58
Q502895
USER
Who wrote the script for Scary Movie 3 ?
(Q635937,P58,c(Q502895))
action filter_type
action find
entity Q635937
relation P58
type Q502895
['Q635937', 'P58', {'concept': 'Q502895'}]
SELECT DISTINCT ?i WHERE { resource:Q635937 property:P58 ?i . ?i rdf:type ontology:Q502895 }
Scary Movie 3
action filter_type
action find
entity Scary Movie 3
relation screenwriter
type common name
['Scary Movie 3', 'screenwriter', {'concept': 'common name'}]
SELECT DISTINCT ?i WHERE { resource:Scary_Movie_3 property:screenwriter ?i . ?i rdf:type ontology:common_name }
[]
common name
Q310785 Q263607 Q1138605
SYSTEM
Marlon Wayans, Pat Proft, Craig Mazin
Q263607 Q936338 Q302690 Q310785 Q1138605 Q370102
(Q635937,P58,c(Q502895))
action filter_type
action find
entity Q635937
relation P58
type Q502895
[ANSWERS] wrote the script for Scary Movie 3
['Q635937', 'P58', {'concept': 'Q502895'}]
SELECT DISTINCT ?i WHERE { resource:Q635937 property:P58 ?i . ?i rdf:type ontology:Q502895 }
Pat Proft Jason Friedberg Aaron Seltzer Marlon Wayans Craig Mazin Shawn Wayans
Marlon Wayans, Pat Proft and Craig Mazin wrote the script for Scary Movie 3
Marlon Wayans Pat Proft Craig Mazin
action filter_type
action find
entity Scary Movie 3
relation screenwriter
type common name
['Scary Movie 3', 'screenwriter', {'concept': 'common name'}]
SELECT DISTINCT ?i WHERE { resource:Scary_Movie_3 property:screenwriter ?i . ?i rdf:type ontology:common_name }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q1032727
Q502895
USER
And also tell me about No, or the Vain Glory of Command?
(Q1032727,P58,c(Q502895))
action filter_type
action find
entity Q1032727
relation P58
type Q502895
['Q1032727', 'P58', {'concept': 'Q502895'}]
SELECT DISTINCT ?d WHERE { resource:Q1032727 property:P58 ?d . ?d rdf:type ontology:Q502895 }
No, or the Vain Glory of Command
action filter_type
action find
entity No, or the Vain Glory of Command
relation screenwriter
type common name
['No, or the Vain Glory of Command', 'screenwriter', {'concept': 'common name'}]
SELECT DISTINCT ?d WHERE { resource:No,_or_the_Vain_Glory_of_Command property:screenwriter ?d . ?d rdf:type ontology:common_name }
[]
common name
Q43264
SYSTEM
Manoel de Oliveira
Q43264
(Q1032727,P58,c(Q502895))
action filter_type
action find
entity Q1032727
relation P58
type Q502895
[ANSWER]
['Q1032727', 'P58', {'concept': 'Q502895'}]
SELECT DISTINCT ?d WHERE { resource:Q1032727 property:P58 ?d . ?d rdf:type ontology:Q502895 }
Manoel de Oliveira
Manoel de Oliveira
action filter_type
action find
entity No, or the Vain Glory of Command
relation screenwriter
type common name
['No, or the Vain Glory of Command', 'screenwriter', {'concept': 'common name'}]
SELECT DISTINCT ?d WHERE { resource:No,_or_the_Vain_Glory_of_Command property:screenwriter ?d . ?d rdf:type ontology:common_name }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P417
Q502895 Q56061 Q12737077
USER
Which people are the patron saint of max number of administrative territories and occupations ?
(c(Q56061)|c(Q12737077),P417,c(Q502895))
action argmax
action union
action find_reverse_tuple_counts
relation P417
type Q502895
type Q56061
action find_reverse_tuple_counts
relation P417
type Q502895
type Q12737077
[[{'concept': 'Q56061'}, {'concept': 'Q12737077'}], 'P417', {'concept': 'Q502895'}]
SELECT DISTINCT ?b WHERE { { SELECT DISTINCT ( MAX ( ?j ) AS ?w ) { SELECT DISTINCT ?y ( COUNT ( ?e ) AS ?j ) WHERE { ?e rdf:type ?s . VALUES ( ?s ) { ( ontology:Q56061 ) ( ontology:Q12737077 ) } } GROUP BY ?y } } . { SELECT DISTINCT ?b ( COUNT ( ?c ) AS ?n ) WHERE { { ?c property:P417 ?b . ?b rdf:type ontology:Q502895 . ?c rdf:type ontology:Q56061 } UNION { ?c rdf:type ontology:Q12737077 . ?b rdf:type ontology:Q502895 . ?c property:P417 ?b } } GROUP BY ?b } . FILTER ( ?n = ?w ) }
action argmax
action union
action find_reverse_tuple_counts
relation patron saint
type common name
type administrative territorial entity
action find_reverse_tuple_counts
relation patron saint
type common name
type occupation
[[{'concept': 'administrative territorial entity'}, {'concept': 'occupation'}], 'patron saint', {'concept': 'common name'}]
SELECT DISTINCT ?b WHERE { { SELECT DISTINCT ( MAX ( ?j ) AS ?w ) { SELECT DISTINCT ?y ( COUNT ( ?e ) AS ?j ) WHERE { ?e rdf:type ?s . VALUES ( ?s ) { ( ontology:administrative_territorial_entity ) ( ontology:occupation ) } } GROUP BY ?y } } . { SELECT DISTINCT ?b ( COUNT ( ?c ) AS ?n ) WHERE { { ?c property:patron_saint ?b . ?b rdf:type ontology:common_name . ?c rdf:type ontology:administrative_territorial_entity } UNION { ?c rdf:type ontology:occupation . ?b rdf:type ontology:common_name . ?c property:patron_saint ?b } } GROUP BY ?b } . FILTER ( ?n = ?w ) }
[]
common name administrative territorial entity occupation
Q179718 Q40662
SYSTEM
Catherine of Alexandria, John the Baptist
Q179718 Q40662
(c(Q56061)|c(Q12737077),P417,c(Q502895))
action argmax
action union
action find_reverse_tuple_counts
relation P417
type Q502895
type Q56061
action find_reverse_tuple_counts
relation P417
type Q502895
type Q12737077
[ANSWERS] are the patron saint of max number of administrative territories and occupations
[[{'concept': 'Q56061'}, {'concept': 'Q12737077'}], 'P417', {'concept': 'Q502895'}]
SELECT DISTINCT ?b WHERE { { SELECT DISTINCT ( MAX ( ?j ) AS ?w ) { SELECT DISTINCT ?y ( COUNT ( ?e ) AS ?j ) WHERE { ?e rdf:type ?s . VALUES ( ?s ) { ( ontology:Q56061 ) ( ontology:Q12737077 ) } } GROUP BY ?y } } . { SELECT DISTINCT ?b ( COUNT ( ?c ) AS ?n ) WHERE { { ?c property:P417 ?b . ?b rdf:type ontology:Q502895 . ?c rdf:type ontology:Q56061 } UNION { ?c rdf:type ontology:Q12737077 . ?b rdf:type ontology:Q502895 . ?c property:P417 ?b } } GROUP BY ?b } . FILTER ( ?n = ?w ) }
Catherine of Alexandria John the Baptist
Catherine of Alexandria and John the Baptist are the patron saint of max number of administrative territories and occupations
Catherine of Alexandria John the Baptist
action argmax
action union
action find_reverse_tuple_counts
relation patron saint
type common name
type administrative territorial entity
action find_reverse_tuple_counts
relation patron saint
type common name
type occupation
[[{'concept': 'administrative territorial entity'}, {'concept': 'occupation'}], 'patron saint', {'concept': 'common name'}]
SELECT DISTINCT ?b WHERE { { SELECT DISTINCT ( MAX ( ?j ) AS ?w ) { SELECT DISTINCT ?y ( COUNT ( ?e ) AS ?j ) WHERE { ?e rdf:type ?s . VALUES ( ?s ) { ( ontology:administrative_territorial_entity ) ( ontology:occupation ) } } GROUP BY ?y } } . { SELECT DISTINCT ?b ( COUNT ( ?c ) AS ?n ) WHERE { { ?c property:patron_saint ?b . ?b rdf:type ontology:common_name . ?c rdf:type ontology:administrative_territorial_entity } UNION { ?c rdf:type ontology:occupation . ?b rdf:type ontology:common_name . ?c property:patron_saint ?b } } GROUP BY ?b } . FILTER ( ?n = ?w ) }
[]