Simple Question (Direct)
Simple Question
Q933129
P19
Q56061
USER
Which administrative territory was Chris O'Dowd born at ?
(Q933129,P19,c(Q56061))
action filter_type
action find
entity Q933129
relation P19
type Q56061
['Q933129', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?m WHERE { resource:Q933129 property:P19 ?m . ?m rdf:type ontology:Q56061 }
Chris O'Dowd
action filter_type
action find
entity Chris O'Dowd
relation place of birth
type administrative territorial entity
["Chris O'Dowd", 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?m WHERE { resource:Chris_O'Dowd property:place_of_birth ?m . ?m rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q1124843
SYSTEM
Boyle, County Roscommon
Q1124843
(Q933129,P19,c(Q56061))
action filter_type
action find
entity Q933129
relation P19
type Q56061
Chris O'Dowd was born in [ANSWER]
['Q933129', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?m WHERE { resource:Q933129 property:P19 ?m . ?m rdf:type ontology:Q56061 }
Boyle, County Roscommon
Chris O'Dowd was born in Boyle, County Roscommon
Boyle, County Roscommon
action filter_type
action find
entity Chris O'Dowd
relation place of birth
type administrative territorial entity
["Chris O'Dowd", 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?m WHERE { resource:Chris_O'Dowd property:place_of_birth ?m . ?m rdf:type ontology:administrative_territorial_entity }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q1124843
P17
Q15617994
USER
Which administrative territory does that administrative territory belong to ?
(Q1124843,P17,c(Q15617994))
action filter_type
action find
entity Q1124843
relation P17
type Q15617994
['Q1124843', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?r WHERE { resource:Q1124843 property:P17 ?r . ?r rdf:type ontology:Q15617994 }
Boyle, County Roscommon
action filter_type
action find
entity Boyle, County Roscommon
relation country
type designation for an administrative territorial entity
['Boyle, County Roscommon', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?r WHERE { resource:Boyle,_County_Roscommon property:country ?r . ?r rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q27
SYSTEM
Ireland
Q27
(Q1124843,P17,c(Q15617994))
action filter_type
action find
entity Q1124843
relation P17
type Q15617994
That administrative territory belongs to [ANSWER]
['Q1124843', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?r WHERE { resource:Q1124843 property:P17 ?r . ?r rdf:type ontology:Q15617994 }
Ireland
That administrative territory belongs to Ireland
Ireland
action filter_type
action find
entity Boyle, County Roscommon
relation country
type designation for an administrative territorial entity
['Boyle, County Roscommon', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?r WHERE { resource:Boyle,_County_Roscommon property:country ?r . ?r rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Single entity type
Q27
P530
Q15617994
USER
How many administrative territories have diplomatic relations with Ireland ?
(Q27,P530,c(Q15617994))
action count
action filter_type
action find
entity Q27
relation P530
type Q15617994
['Q27', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?c ) AS ?j ) WHERE { resource:Q27 property:P530 ?c . ?c rdf:type ontology:Q15617994 }
Ireland
action count
action filter_type
action find
entity Ireland
relation diplomatic relation
type designation for an administrative territorial entity
['Ireland', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?c ) AS ?j ) WHERE { resource:Ireland property:diplomatic_relation ?c . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
SYSTEM
4
Q142 Q159 Q953 Q38
(Q27,P530,c(Q15617994))
action count
action filter_type
action find
entity Q27
relation P530
type Q15617994
[ANSWER]
['Q27', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?c ) AS ?j ) WHERE { resource:Q27 property:P530 ?c . ?c rdf:type ontology:Q15617994 }
France Russia Zambia Italy
4
action count
action filter_type
action find
entity Ireland
relation diplomatic relation
type designation for an administrative territorial entity
['Ireland', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?c ) AS ?j ) WHERE { resource:Ireland property:diplomatic_relation ?c . ?c rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Single entity type|Incomplete
Q858
P530
Q15617994
USER
And how about Syria?
(Q858,P530,c(Q15617994))
action count
action filter_type
action find
entity Q858
relation P530
type Q15617994
['Q858', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?q ) AS ?m ) WHERE { resource:Q858 property:P530 ?q . ?q rdf:type ontology:Q15617994 }
Syria
action count
action filter_type
action find
entity Syria
relation diplomatic relation
type designation for an administrative territorial entity
['Syria', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?q ) AS ?m ) WHERE { resource:Syria property:diplomatic_relation ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
SYSTEM
14
Q805 Q810 Q79 Q801 Q41 Q851 Q148 Q796 Q17 Q30 Q399 Q423 Q159 Q822
(Q858,P530,c(Q15617994))
action count
action filter_type
action find
entity Q858
relation P530
type Q15617994
[ANSWER]
['Q858', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?q ) AS ?m ) WHERE { resource:Q858 property:P530 ?q . ?q rdf:type ontology:Q15617994 }
Yemen Jordan Egypt Israel Greece Saudi Arabia People's Republic of China Iraq Japan United States of America Armenia North Korea Russia Lebanon
14
action count
action filter_type
action find
entity Syria
relation diplomatic relation
type designation for an administrative territorial entity
['Syria', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?q ) AS ?m ) WHERE { resource:Syria property:diplomatic_relation ?q . ?q rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (Count) (All)
Incomplete count-based ques
Q155
Q15617994
USER
And also tell me about Brazil?
(Q155,P530,c(Q15617994))
action count
action filter_type
action find
entity Q155
relation P530
type Q15617994
['Q155', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?h ) WHERE { resource:Q155 property:P530 ?n . ?n rdf:type ontology:Q15617994 }
Brazil
action count
action filter_type
action find
entity Brazil
relation diplomatic relation
type designation for an administrative territorial entity
['Brazil', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?h ) WHERE { resource:Brazil property:diplomatic_relation ?n . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
SYSTEM
53
(Q155,P530,c(Q15617994))
action count
action filter_type
action find
entity Q155
relation P530
type Q15617994
[ANSWER]
['Q155', 'P530', {'concept': 'Q15617994'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?h ) WHERE { resource:Q155 property:P530 ?n . ?n rdf:type ontology:Q15617994 }
53
action count
action filter_type
action find
entity Brazil
relation diplomatic relation
type designation for an administrative territorial entity
['Brazil', 'diplomatic relation', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?n ) AS ?h ) WHERE { resource:Brazil property:diplomatic_relation ?n . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q155
P463
Q43229
USER
What organizations had that administrative territory as their member ?
action filter_type
action find
entity Q155
relation P463
type Q43229
SELECT DISTINCT ?n WHERE { resource:Q155 property:P463 ?n . ?n rdf:type ontology:Q43229 }
Brazil
action filter_type
action find
entity Brazil
relation member of
type organization
SELECT DISTINCT ?n WHERE { resource:Brazil property:member_of ?n . ?n rdf:type ontology:organization }
[]
organization
Q151991 Q7825 Q191384
SYSTEM
European Southern Observatory, World Trade Organization, International Bank for Reconstruction and Development
Q340195 Q191384 Q123759 Q1045401 Q182500 Q656801 Q151991 Q123209 Q7825 Q243630 Q827525
action filter_type
action find
entity Q155
relation P463
type Q43229
[ANSWERS] had that administrative territory as their member
SELECT DISTINCT ?n WHERE { resource:Q155 property:P463 ?n . ?n rdf:type ontology:Q43229 }
African Development Bank International Bank for Reconstruction and Development Organization of American States Community of Latin American and Caribbean States Community of Portuguese Language Countries International Finance Corporation European Southern Observatory Latin Union World Trade Organization BRICS International Development Association
European Southern Observatory, World Trade Organization and International Bank for Reconstruction and Development had that administrative territory as their member
European Southern Observatory World Trade Organization International Bank for Reconstruction and Development
action filter_type
action find
entity Brazil
relation member of
type organization
SELECT DISTINCT ?n WHERE { resource:Brazil property:member_of ?n . ?n rdf:type ontology:organization }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q31
P463
Q15617994
USER
Do Belgium have a membership of those organizations ?
(Q31,P463,Q151991) (Q31,P463,Q7825) (Q31,P463,Q191384)
action is_in
entity prev_answer
action find
entity Q31
relation P463
['Q31', 'P463', 'Q151991'] ['Q31', 'P463', 'Q7825'] ['Q31', 'P463', 'Q191384']
ASK WHERE { VALUES ( ?d ) { ( resource:Q340195 ) ( resource:Q191384 ) ( resource:Q123759 ) } . resource:Q31 property:P463 ?d }
Belgium
action is_in
entity prev_answer
action find
entity Belgium
relation member of
['Belgium', 'member of', 'European Southern Observatory'] ['Belgium', 'member of', 'World Trade Organization'] ['Belgium', 'member of', 'International Bank for Reconstruction and Development']
ASK WHERE { VALUES ( ?d ) { ( resource:African_Development_Bank ) ( resource:International_Bank_for_Reconstruction_and_Development ) ( resource:Organization_of_American_States ) } . resource:Belgium property:member_of ?d }
[]
designation for an administrative territorial entity
SYSTEM
YES
(Q31,P463,Q151991) (Q31,P463,Q7825) (Q31,P463,Q191384)
action is_in
entity prev_answer
action find
entity Q31
relation P463
[ANSWER]
['Q31', 'P463', 'Q151991'] ['Q31', 'P463', 'Q7825'] ['Q31', 'P463', 'Q191384']
ASK WHERE { VALUES ( ?d ) { ( resource:Q340195 ) ( resource:Q191384 ) ( resource:Q123759 ) } . resource:Q31 property:P463 ?d }
Yes
action is_in
entity prev_answer
action find
entity Belgium
relation member of
['Belgium', 'member of', 'European Southern Observatory'] ['Belgium', 'member of', 'World Trade Organization'] ['Belgium', 'member of', 'International Bank for Reconstruction and Development']
ASK WHERE { VALUES ( ?d ) { ( resource:African_Development_Bank ) ( resource:International_Bank_for_Reconstruction_and_Development ) ( resource:Organization_of_American_States ) } . resource:Belgium property:member_of ?d }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q27
P840
Q15416
USER
Which television programs have a setting location of Ireland ?
(c(Q15416),P840,Q27)
action filter_type
action find_reverse
entity Q27
relation P840
type Q15416
[{'concept': 'Q15416'}, 'P840', 'Q27']
SELECT DISTINCT ?k WHERE { ?k property:P840 resource:Q27 . ?k rdf:type ontology:Q15416 }
Ireland
action filter_type
action find_reverse
entity Ireland
relation narrative location
type television program
[{'concept': 'television program'}, 'narrative location', 'Ireland']
SELECT DISTINCT ?k WHERE { ?k property:narrative_location resource:Ireland . ?k rdf:type ontology:television_program }
[]
television program
Q16205080 Q2575053
SYSTEM
Teenage Mutant Ninja Turtles (1987 TV series) (season 7), Ballykissangel
Q16205080 Q2575053
(c(Q15416),P840,Q27)
action filter_type
action find_reverse
entity Q27
relation P840
type Q15416
[ANSWERS] have a setting location of Ireland
[{'concept': 'Q15416'}, 'P840', 'Q27']
SELECT DISTINCT ?k WHERE { ?k property:P840 resource:Q27 . ?k rdf:type ontology:Q15416 }
Teenage Mutant Ninja Turtles (1987 TV series) (season 7) Ballykissangel
Teenage Mutant Ninja Turtles (1987 TV series) (season 7) and Ballykissangel have a setting location of Ireland
Teenage Mutant Ninja Turtles (1987 TV series) (season 7) Ballykissangel
action filter_type
action find_reverse
entity Ireland
relation narrative location
type television program
[{'concept': 'television program'}, 'narrative location', 'Ireland']
SELECT DISTINCT ?k WHERE { ?k property:narrative_location resource:Ireland . ?k rdf:type ontology:television_program }
[]
Clarification
Simple Question|Single Entity|Indirect
Q16205080
P361
Q15961987
USER
What is that television program a component of ?
(Q16205080,P361,c(Q15961987))
action filter_type
action find
entity Q16205080
relation P361
type Q15961987
['Q16205080', 'P361', {'concept': 'Q15961987'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:Q15961987 . resource:Q16205080 property:P361 ?f }
Teenage Mutant Ninja Turtles (1987 TV series) (season 7)
action filter_type
action find
entity Teenage Mutant Ninja Turtles (1987 TV series) (season 7)
relation part of
type television genre
['Teenage Mutant Ninja Turtles (1987 TV series) (season 7)', 'part of', {'concept': 'television genre'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:television_genre . resource:Teenage_Mutant_Ninja_Turtles_(1987_TV_series)_(season_7) property:part_of ?f }
[]
television genre
Clarification for simple ques.
Q2575053
SYSTEM
Did you mean Ballykissangel ?
Q16205080 Q2575053
(Q16205080,P361,c(Q15961987)) (Q2575053,P361,c(Q15961987))
[ANSWER]
['Q16205080', 'P361', {'concept': 'Q15961987'}] ['Q2575053', 'P361', {'concept': 'Q15961987'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:Q15961987 . resource:Q16205080 property:P361 ?f }
Teenage Mutant Ninja Turtles (1987 TV series) (season 7) Ballykissangel
Did you mean Ballykissangel ?
Ballykissangel
['Teenage Mutant Ninja Turtles (1987 TV series) (season 7)', 'part of', {'concept': 'television genre'}] ['Ballykissangel', 'part of', {'concept': 'television genre'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:television_genre . resource:Teenage_Mutant_Ninja_Turtles_(1987_TV_series)_(season_7) property:part_of ?f }
[]
Simple Question (Coreferenced)
USER
No, I meant Teenage Mutant Ninja Turtles (1987 TV series) (season 7). Could you tell me the answer for that?
(Q16205080,P361,c(Q15961987))
Q16205080
['Q16205080', 'P361', {'concept': 'Q15961987'}]
['Teenage Mutant Ninja Turtles (1987 TV series) (season 7)', 'part of', {'concept': 'television genre'}]
[]
Q249056
SYSTEM
Teenage Mutant Ninja Turtles
Q249056
(Q16205080,P361,c(Q15961987))
action filter_type
action find
entity Q16205080
relation P361
type Q15961987
That television program a component of is the [ANSWER]
['Q16205080', 'P361', {'concept': 'Q15961987'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:Q15961987 . resource:Q16205080 property:P361 ?f }
Teenage Mutant Ninja Turtles
That television program a component of is the Teenage Mutant Ninja Turtles
Teenage Mutant Ninja Turtles
action filter_type
action find
entity Teenage Mutant Ninja Turtles (1987 TV series) (season 7)
relation part of
type television genre
['Teenage Mutant Ninja Turtles (1987 TV series) (season 7)', 'part of', {'concept': 'television genre'}]
SELECT DISTINCT ?f WHERE { ?f rdf:type ontology:television_genre . resource:Teenage_Mutant_Ninja_Turtles_(1987_TV_series)_(season_7) property:part_of ?f }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P144
Q234460 Q15416 Q15961987
USER
Which television genres are based on min number of texts and television programs ?
(c(Q15961987),P144,c(Q234460)|c(Q15416))
action argmin
action union
action find_tuple_counts
relation P144
type Q15961987
type Q234460
action find_tuple_counts
relation P144
type Q15961987
type Q15416
[{'concept': 'Q15961987'}, 'P144', [{'concept': 'Q234460'}, {'concept': 'Q15416'}]]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MIN ( ?v ) AS ?x ) { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?v ) WHERE { ?i rdf:type ?k . VALUES ( ?k ) { ( ontology:Q234460 ) ( ontology:Q15416 ) } } GROUP BY ?w } } . { SELECT DISTINCT ?j ( COUNT ( ?m ) AS ?f ) WHERE { { ?j property:P144 ?m . ?m rdf:type ontology:Q234460 . ?j rdf:type ontology:Q15961987 } UNION { ?m rdf:type ontology:Q15416 . ?j rdf:type ontology:Q15961987 . ?j property:P144 ?m } } GROUP BY ?j } . FILTER ( ?f = ?x ) }
action argmin
action union
action find_tuple_counts
relation based on
type television genre
type text
action find_tuple_counts
relation based on
type television genre
type television program
[{'concept': 'television genre'}, 'based on', [{'concept': 'text'}, {'concept': 'television program'}]]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MIN ( ?v ) AS ?x ) { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?v ) WHERE { ?i rdf:type ?k . VALUES ( ?k ) { ( ontology:text ) ( ontology:television_program ) } } GROUP BY ?w } } . { SELECT DISTINCT ?j ( COUNT ( ?m ) AS ?f ) WHERE { { ?j property:based_on ?m . ?m rdf:type ontology:text . ?j rdf:type ontology:television_genre } UNION { ?m rdf:type ontology:television_program . ?j rdf:type ontology:television_genre . ?j property:based_on ?m } } GROUP BY ?j } . FILTER ( ?f = ?x ) }
[]
text television program television genre
Q1066948 Q5415 Q12500134
SYSTEM
Ghost in the Shell, My Little Pony: Friendship Is Magic, Naruto: Shippūden
Q16830194 Q2905862 Q2857749 Q18118907 Q2760256 Q10911282 Q257839 Q11635891 Q4796584 Q13427472 Q3782358 Q16878961 Q3641079 Q6421687 Q3284392 Q1194571 Q16747052 Q16830179 Q576501 Q15846395 Q2481867 Q15846391 Q493774 Q916946 Q704651 Q19357037 Q15051479 Q5415 Q11544915 Q11544914 Q11544913 Q15283528 Q16748948 Q1042019 Q2332113 Q676786 Q3641021 Q1066948 Q5276650 Q11544916 Q16521550 Q20354790 Q3038453 Q21233414 Q2698991 Q12500134 Q16878993 Q3699736 Q2700068 Q5594013 Q17052042 Q2403567 Q19954870 Q3038448 Q653789 Q5390008 Q15949405 Q17508236 Q16748951
(c(Q15961987),P144,c(Q234460)|c(Q15416))
action argmin
action union
action find_tuple_counts
relation P144
type Q15961987
type Q234460
action find_tuple_counts
relation P144
type Q15961987
type Q15416
Ghost in the Shell, My Little Pony: Friendship is Magic and Naruto: Shippūden are based on min number of texts and television programs
[{'concept': 'Q15961987'}, 'P144', [{'concept': 'Q234460'}, {'concept': 'Q15416'}]]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MIN ( ?v ) AS ?x ) { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?v ) WHERE { ?i rdf:type ?k . VALUES ( ?k ) { ( ontology:Q234460 ) ( ontology:Q15416 ) } } GROUP BY ?w } } . { SELECT DISTINCT ?j ( COUNT ( ?m ) AS ?f ) WHERE { { ?j property:P144 ?m . ?m rdf:type ontology:Q234460 . ?j rdf:type ontology:Q15961987 } UNION { ?m rdf:type ontology:Q15416 . ?j rdf:type ontology:Q15961987 . ?j property:P144 ?m } } GROUP BY ?j } . FILTER ( ?f = ?x ) }
YuruYuri Blake and Mortimer Operación Triunfo The Return of the Condor Heroes Wakfu The Legendary Ranger Creature Comforts Akō Rōshi Rupan Shanshei Spirou et Fantasio Honey and Clover OniAi Bloody Monday Kmetija The Twisted Whiskers Show The Inspector Is the Order a Rabbit? Sora no Manimani Garfield and Friends Love, Chunibyo and Other Delusions! -Heart Throb- Big Brother Brasil Love, Chunibyo & Other Delusions My Fair Lady Mad Dragon Ball Z Kai The Idolmaster Cinderella Girls Black Bullet My Little Pony: Friendship Is Magic Jirochō Sangokushi: Tōkaidō no abarenbō Jirochō Sangokushi Jirochō Sangokushi HaKoKav HaBa Oreimo Yokoyama Mitsuteru Sangokushi The Adventures of Paddington Bear Albert the Fifth Musketeer Blondie Ghost in the Shell Dil kam No Dil Jirochō Sangokushi: Seizoroi Nijūhachinin-shū Kenka-tabi Gunslinger Girl Late Night Restaurant Dr. Slump The Almost Impossible Game Show New Cutie Honey Naruto: Shippūden Non Non Biyori Honey & Clover Rambo: The Force of Freedom Gran Hermano It's Academic A Fazenda Peter Pan Doctor Slump Pippi Longstocking Lupin III Part III Hayate the Combat Butler Be Cool, Scooby-Doo! Ore no Imōto ga Konna ni Kawaii Wake ga Nai.
Ghost in the Shell, My Little Pony: Friendship is Magic and Naruto: Shippūden are based on min number of texts and television programs
Ghost in the Shell My Little Pony: Friendship Is Magic Naruto: Shippūden
action argmin
action union
action find_tuple_counts
relation based on
type television genre
type text
action find_tuple_counts
relation based on
type television genre
type television program
[{'concept': 'television genre'}, 'based on', [{'concept': 'text'}, {'concept': 'television program'}]]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MIN ( ?v ) AS ?x ) { SELECT DISTINCT ?w ( COUNT ( ?i ) AS ?v ) WHERE { ?i rdf:type ?k . VALUES ( ?k ) { ( ontology:text ) ( ontology:television_program ) } } GROUP BY ?w } } . { SELECT DISTINCT ?j ( COUNT ( ?m ) AS ?f ) WHERE { { ?j property:based_on ?m . ?m rdf:type ontology:text . ?j rdf:type ontology:television_genre } UNION { ?m rdf:type ontology:television_program . ?j rdf:type ontology:television_genre . ?j property:based_on ?m } } GROUP BY ?j } . FILTER ( ?f = ?x ) }
[]