Simple Question (Direct)
Simple Question
Q1385796
P19
Q56061
USER
Which administrative territory was Eygló Harðardóttir born in ?
(Q1385796,P19,c(Q56061))
action filter_type
action find
entity Q1385796
relation P19
type Q56061
['Q1385796', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?t WHERE { resource:Q1385796 property:P19 ?t . ?t rdf:type ontology:Q56061 }
Eygló Harðardóttir
action filter_type
action find
entity Eygló Harðardóttir
relation place of birth
type administrative territorial entity
['Eygló Harðardóttir', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?t WHERE { resource:Eygló_Harðardóttir property:place_of_birth ?t . ?t rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q1764
SYSTEM
Reykjavík
Q1764
(Q1385796,P19,c(Q56061))
action filter_type
action find
entity Q1385796
relation P19
type Q56061
Eygló Harðardóttir was born in [ANSWER]
['Q1385796', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ?t WHERE { resource:Q1385796 property:P19 ?t . ?t rdf:type ontology:Q56061 }
Reykjavík
Eygló Harðardóttir was born in Reykjavík
Reykjavík
action filter_type
action find
entity Eygló Harðardóttir
relation place of birth
type administrative territorial entity
['Eygló Harðardóttir', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?t WHERE { resource:Eygló_Harðardóttir property:place_of_birth ?t . ?t rdf:type ontology:administrative_territorial_entity }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q1385796
P39
Q12737077
USER
Which occupation was a position occupied by Eygló Harðardóttir ?
(Q1385796,P39,c(Q12737077))
action filter_type
action find
entity Q1385796
relation P39
type Q12737077
['Q1385796', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?q WHERE { resource:Q1385796 property:P39 ?q . ?q rdf:type ontology:Q12737077 }
Eygló Harðardóttir
action filter_type
action find
entity Eygló Harðardóttir
relation position held
type occupation
['Eygló Harðardóttir', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?q WHERE { resource:Eygló_Harðardóttir property:position_held ?q . ?q rdf:type ontology:occupation }
[]
occupation
Q21272959
SYSTEM
Member of the Althing
Q21272959
(Q1385796,P39,c(Q12737077))
action filter_type
action find
entity Q1385796
relation P39
type Q12737077
[ANSWER] was a position occupied by Eygló Harðardóttir
['Q1385796', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?q WHERE { resource:Q1385796 property:P39 ?q . ?q rdf:type ontology:Q12737077 }
Member of the Althing
Member of the Althing was a position occupied by Eygló Harðardóttir
Member of the Althing
action filter_type
action find
entity Eygló Harðardóttir
relation position held
type occupation
['Eygló Harðardóttir', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?q WHERE { resource:Eygló_Harðardóttir property:position_held ?q . ?q rdf:type ontology:occupation }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q1752477
Q12737077
USER
And also tell me about Nicholas Shaxton?
(Q1752477,P39,c(Q12737077))
action filter_type
action find
entity Q1752477
relation P39
type Q12737077
['Q1752477', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?v WHERE { resource:Q1752477 property:P39 ?v . ?v rdf:type ontology:Q12737077 }
Nicholas Shaxton
action filter_type
action find
entity Nicholas Shaxton
relation position held
type occupation
['Nicholas Shaxton', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?v WHERE { resource:Nicholas_Shaxton property:position_held ?v . ?v rdf:type ontology:occupation }
[]
occupation
Q1636762
SYSTEM
Bishop of Salisbury
Q1636762
(Q1752477,P39,c(Q12737077))
action filter_type
action find
entity Q1752477
relation P39
type Q12737077
[ANSWER]
['Q1752477', 'P39', {'concept': 'Q12737077'}]
SELECT DISTINCT ?v WHERE { resource:Q1752477 property:P39 ?v . ?v rdf:type ontology:Q12737077 }
Bishop of Salisbury
Bishop of Salisbury
action filter_type
action find
entity Nicholas Shaxton
relation position held
type occupation
['Nicholas Shaxton', 'position held', {'concept': 'occupation'}]
SELECT DISTINCT ?v WHERE { resource:Nicholas_Shaxton property:position_held ?v . ?v rdf:type ontology:occupation }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, object is indirect
Q1636762 Q8040738
P39
Q502895
USER
Was Wærstan responsible for occupying the position of that occupation ?
(Q8040738,P39,Q1636762)
action is_in
entity Q1636762
action find
entity Q8040738
relation P39
['Q8040738', 'P39', 'Q1636762']
ASK WHERE { resource:Q8040738 property:P39 resource:Q1636762 }
Bishop of Salisbury Wærstan
action is_in
entity Bishop of Salisbury
action find
entity Wærstan
relation position held
['Wærstan', 'position held', 'Bishop of Salisbury']
ASK WHERE { resource:Wærstan property:position_held resource:Bishop_of_Salisbury }
[]
common name
SYSTEM
YES
(Q8040738,P39,Q1636762)
action is_in
entity Q1636762
action find
entity Q8040738
relation P39
[ANSWER]
['Q8040738', 'P39', 'Q1636762']
ASK WHERE { resource:Q8040738 property:P39 resource:Q1636762 }
Yes
action is_in
entity Bishop of Salisbury
action find
entity Wærstan
relation position held
['Wærstan', 'position held', 'Bishop of Salisbury']
ASK WHERE { resource:Wærstan property:position_held resource:Bishop_of_Salisbury }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q1043831 Q1636762
P17
Q15617994
USER
Which administrative territories are Bishop of Salisbury or Stará Myjava located in ?
OR((Q1636762,P17,c(Q15617994)), (Q1043831,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q1636762
relation P17
action find
entity Q1043831
relation P17
type Q15617994
{'OR': [['Q1636762', 'P17', {'concept': 'Q15617994'}], ['Q1043831', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?k WHERE { { VALUES ( ?b ) { ( resource:Q1043831 ) ( resource:Q1636762 ) } . ?b property:P17 ?k } . ?k rdf:type ontology:Q15617994 }
Stará Myjava Bishop of Salisbury
action filter_type
action union
action find
entity Bishop of Salisbury
relation country
action find
entity Stará Myjava
relation country
type designation for an administrative territorial entity
{'OR': [['Bishop of Salisbury', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Stará Myjava', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?k WHERE { { VALUES ( ?b ) { ( resource:Stará_Myjava ) ( resource:Bishop_of_Salisbury ) } . ?b property:country ?k } . ?k rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q214 Q145
SYSTEM
Slovakia, United Kingdom
Q214 Q145
OR((Q1636762,P17,c(Q15617994)), (Q1043831,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q1636762
relation P17
action find
entity Q1043831
relation P17
type Q15617994
Bishop of Salisbury or Stará Myjava are located in [ANSWERS]
{'OR': [['Q1636762', 'P17', {'concept': 'Q15617994'}], ['Q1043831', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?k WHERE { { VALUES ( ?b ) { ( resource:Q1043831 ) ( resource:Q1636762 ) } . ?b property:P17 ?k } . ?k rdf:type ontology:Q15617994 }
Slovakia United Kingdom
Bishop of Salisbury or Stará Myjava are located in Slovakia and United Kingdom
Slovakia United Kingdom
action filter_type
action union
action find
entity Bishop of Salisbury
relation country
action find
entity Stará Myjava
relation country
type designation for an administrative territorial entity
{'OR': [['Bishop of Salisbury', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Stará Myjava', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?k WHERE { { VALUES ( ?b ) { ( resource:Stará_Myjava ) ( resource:Bishop_of_Salisbury ) } . ?b property:country ?k } . ?k rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (All)
Quantitative|Atleast/ Atmost/ Approx. the same/Equal|Mult. entity type
P1441
Q15416 Q234460 Q502895
USER
Which people are seen in approximately 2 television programs and texts ?
(c(Q502895),P1441,c(Q15416)|c(Q234460))
action approx
action union
action find_tuple_counts
relation P1441
type Q502895
type Q15416
action find_tuple_counts
relation P1441
type Q502895
type Q234460
value 2
[{'concept': 'Q502895'}, 'P1441', [{'concept': 'Q15416'}, {'concept': 'Q234460'}]]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( COUNT ( ?s ) AS ?z ) ?t WHERE { { ?t property:P1441 ?s . ?s rdf:type ontology:Q15416 . ?t rdf:type ontology:Q502895 } UNION { ?t property:P1441 ?s . ?t rdf:type ontology:Q502895 . ?s rdf:type ontology:Q234460 } } GROUP BY ?t } . FILTER ( ?z = 2 ) }
action approx
action union
action find_tuple_counts
relation present in work
type common name
type television program
action find_tuple_counts
relation present in work
type common name
type text
value 2
[{'concept': 'common name'}, 'present in work', [{'concept': 'television program'}, {'concept': 'text'}]]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( COUNT ( ?s ) AS ?z ) ?t WHERE { { ?t property:present_in_work ?s . ?s rdf:type ontology:television_program . ?t rdf:type ontology:common_name } UNION { ?t property:present_in_work ?s . ?t rdf:type ontology:common_name . ?s rdf:type ontology:text } } GROUP BY ?t } . FILTER ( ?z = 2 ) }
[]
television program text common name
Q1353836 Q32295
SYSTEM
Hrothgar, Michael J. Massimino
Q1353836 Q32295
(c(Q502895),P1441,c(Q15416)|c(Q234460))
action approx
action union
action find_tuple_counts
relation P1441
type Q502895
type Q15416
action find_tuple_counts
relation P1441
type Q502895
type Q234460
value 2
[ANSWERS] are seen in approximately 2 television programs and texts
[{'concept': 'Q502895'}, 'P1441', [{'concept': 'Q15416'}, {'concept': 'Q234460'}]]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( COUNT ( ?s ) AS ?z ) ?t WHERE { { ?t property:P1441 ?s . ?s rdf:type ontology:Q15416 . ?t rdf:type ontology:Q502895 } UNION { ?t property:P1441 ?s . ?t rdf:type ontology:Q502895 . ?s rdf:type ontology:Q234460 } } GROUP BY ?t } . FILTER ( ?z = 2 ) }
Hrothgar Michael J. Massimino
Hrothgar and Michael J. Massimino are seen in approximately 2 television programs and texts
Hrothgar Michael J. Massimino
action approx
action union
action find_tuple_counts
relation present in work
type common name
type television program
action find_tuple_counts
relation present in work
type common name
type text
value 2
[{'concept': 'common name'}, 'present in work', [{'concept': 'television program'}, {'concept': 'text'}]]
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( COUNT ( ?s ) AS ?z ) ?t WHERE { { ?t property:present_in_work ?s . ?s rdf:type ontology:television_program . ?t rdf:type ontology:common_name } UNION { ?t property:present_in_work ?s . ?t rdf:type ontology:common_name . ?s rdf:type ontology:text } } GROUP BY ?t } . FILTER ( ?z = 2 ) }
[]
Simple Question (Coreferenced)
Simple Question|Mult. Entity
Q1353836 Q32295
P21
Q290
USER
Which sexes do those people belong to ?
(Q1353836,P21,c(Q290)) (Q32295,P21,c(Q290))
action filter_type
action find
entity prev_answer
relation P21
type Q290
['Q1353836', 'P21', {'concept': 'Q290'}] ['Q32295', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?r WHERE { ?r rdf:type ontology:Q290 . VALUES ( ?d ) { ( resource:Q1353836 ) ( resource:Q32295 ) } . ?d property:P21 ?r }
Hrothgar Michael J. Massimino
action filter_type
action find
entity prev_answer
relation gender
type sex
['Hrothgar', 'gender', {'concept': 'sex'}] ['Michael J. Massimino', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?r WHERE { ?r rdf:type ontology:sex . VALUES ( ?d ) { ( resource:Hrothgar ) ( resource:Michael_J._Massimino ) } . ?d property:gender ?r }
[]
sex
Q6581097 Q6581097
SYSTEM
male
Q6581097 Q6581097
(Q1353836,P21,c(Q290)) (Q32295,P21,c(Q290))
action filter_type
action find
entity prev_answer
relation P21
type Q290
Those people belong to [ANSWER] and [ANSWER]
['Q1353836', 'P21', {'concept': 'Q290'}] ['Q32295', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?r WHERE { ?r rdf:type ontology:Q290 . VALUES ( ?d ) { ( resource:Q1353836 ) ( resource:Q32295 ) } . ?d property:P21 ?r }
male male
Those people belong to male and male
male male
action filter_type
action find
entity prev_answer
relation gender
type sex
['Hrothgar', 'gender', {'concept': 'sex'}] ['Michael J. Massimino', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?r WHERE { ?r rdf:type ontology:sex . VALUES ( ?d ) { ( resource:Hrothgar ) ( resource:Michael_J._Massimino ) } . ?d property:gender ?r }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q214
P20
Q502895
USER
Which people expired at Slovakia ?
(c(Q502895),P20,Q214)
action filter_type
action find_reverse
entity Q214
relation P20
type Q502895
[{'concept': 'Q502895'}, 'P20', 'Q214']
SELECT DISTINCT ?k WHERE { ?k property:P20 resource:Q214 . ?k rdf:type ontology:Q502895 }
Slovakia
action filter_type
action find_reverse
entity Slovakia
relation place of death
type common name
[{'concept': 'common name'}, 'place of death', 'Slovakia']
SELECT DISTINCT ?k WHERE { ?k property:place_of_death resource:Slovakia . ?k rdf:type ontology:common_name }
[]
common name
Q3215958 Q820863 Q6309988
SYSTEM
Ladislav Józsa, László Weiner, Julius Nota
Q13421133 Q3505380 Q13421522 Q13408887 Q1696184 Q12780875 Q1002630 Q1328223 Q3215958 Q13409017 Q6758801 Q793876 Q12765295 Q12768565 Q768466 Q12021980 Q3489801 Q13374806 Q700560 Q3647192 Q1800007 Q820863 Q12762284 Q6309988 Q1319859 Q12766048
(c(Q502895),P20,Q214)
action filter_type
action find_reverse
entity Q214
relation P20
type Q502895
As [ANSWERS] expired at Slovakia
[{'concept': 'Q502895'}, 'P20', 'Q214']
SELECT DISTINCT ?k WHERE { ?k property:P20 resource:Q214 . ?k rdf:type ontology:Q502895 }
György Radvánszky Štefan Babjak Ján Ľudomil Štepán Ferdinand Szantó Paul Pálffy von Erdöd Zuzana Thurzová György Foltinovits János Török Ladislav Józsa František Fábry Marek Brezovský Ján Berzevici Eliáš Breithor Ján Mathé Sándor Andreánszky Ivan Palúch Dežo Ursiny Andrej Kolbány Ivan III Drašković Dmitry Yemelianovich Astapenko Ladislav Móder László Weiner Andrej Dobrota Julius Nota Peter Riedemann František Rédei
As Ladislav Józsa, László Weiner and Julius Nota expired at Slovakia
Ladislav Józsa László Weiner Julius Nota
action filter_type
action find_reverse
entity Slovakia
relation place of death
type common name
[{'concept': 'common name'}, 'place of death', 'Slovakia']
SELECT DISTINCT ?k WHERE { ?k property:place_of_death resource:Slovakia . ?k rdf:type ontology:common_name }
[]
Clarification
Simple Question|Single Entity|Indirect
Q820863
P1303
Q34379
USER
Which musical instrument is played by that person ?
(Q820863,P1303,c(Q34379))
action filter_type
action find
entity Q820863
relation P1303
type Q34379
['Q820863', 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?g WHERE { resource:Q820863 property:P1303 ?g . ?g rdf:type ontology:Q34379 }
László Weiner
action filter_type
action find
entity László Weiner
relation instrument
type musical instrument
['László Weiner', 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?g WHERE { resource:László_Weiner property:instrument ?g . ?g rdf:type ontology:musical_instrument }
[]
musical instrument
Clarification for simple ques.
Q6309988
SYSTEM
Did you mean Julius Nota ?
Q3215958 Q820863 Q6309988
(Q3215958,P1303,c(Q34379)) (Q820863,P1303,c(Q34379)) (Q6309988,P1303,c(Q34379))
[ANSWER]
['Q3215958', 'P1303', {'concept': 'Q34379'}] ['Q820863', 'P1303', {'concept': 'Q34379'}] ['Q6309988', 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?g WHERE { resource:Q820863 property:P1303 ?g . ?g rdf:type ontology:Q34379 }
Ladislav Józsa László Weiner Julius Nota
Did you mean Julius Nota ?
Julius Nota
['Ladislav Józsa', 'instrument', {'concept': 'musical instrument'}] ['László Weiner', 'instrument', {'concept': 'musical instrument'}] ['Julius Nota', 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?g WHERE { resource:László_Weiner property:instrument ?g . ?g rdf:type ontology:musical_instrument }
[]
Simple Question (Coreferenced)
USER
No, I meant László Weiner. Could you tell me the answer for that?
(Q820863,P1303,c(Q34379))
Q820863
['Q820863', 'P1303', {'concept': 'Q34379'}]
['László Weiner', 'instrument', {'concept': 'musical instrument'}]
[]
Q5994
SYSTEM
piano
Q5994
(Q820863,P1303,c(Q34379))
action filter_type
action find
entity Q820863
relation P1303
type Q34379
[ANSWER] is played by that person
['Q820863', 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?g WHERE { resource:Q820863 property:P1303 ?g . ?g rdf:type ontology:Q34379 }
piano
Piano is played by that person
piano
action filter_type
action find
entity László Weiner
relation instrument
type musical instrument
['László Weiner', 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?g WHERE { resource:László_Weiner property:instrument ?g . ?g rdf:type ontology:musical_instrument }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P206
Q337567 Q1267889 Q56061
USER
Which administrative territories are located nearby max number of still waterss or waterways ?
(c(Q56061),P206,c(Q337567)|c(Q1267889))
action argmax
action union
action find_tuple_counts
relation P206
type Q56061
type Q337567
action find_tuple_counts
relation P206
type Q56061
type Q1267889
[{'concept': 'Q56061'}, 'P206', [{'concept': 'Q337567'}, {'concept': 'Q1267889'}]]
SELECT DISTINCT ?f WHERE { { SELECT DISTINCT ?f ( COUNT ( ?s ) AS ?w ) WHERE { { ?f property:P206 ?s . ?s rdf:type ontology:Q337567 . ?f rdf:type ontology:Q56061 } UNION { ?f property:P206 ?s . ?f rdf:type ontology:Q56061 . ?s rdf:type ontology:Q1267889 } } GROUP BY ?f } . FILTER ( ?w = ?x ) . { SELECT DISTINCT ( MAX ( ?h ) AS ?x ) { SELECT DISTINCT ?t ( COUNT ( ?c ) AS ?h ) WHERE { { ?t property:P206 ?c . ?t rdf:type ontology:Q56061 . ?c rdf:type ontology:Q337567 } UNION { ?t rdf:type ontology:Q56061 . ?c rdf:type ontology:Q1267889 . ?t property:P206 ?c } } GROUP BY ?t } } }
action argmax
action union
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type still waters
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type waterway
[{'concept': 'administrative territorial entity'}, 'located next to body of water', [{'concept': 'still waters'}, {'concept': 'waterway'}]]
SELECT DISTINCT ?f WHERE { { SELECT DISTINCT ?f ( COUNT ( ?s ) AS ?w ) WHERE { { ?f property:located_next_to_body_of_water ?s . ?s rdf:type ontology:still_waters . ?f rdf:type ontology:administrative_territorial_entity } UNION { ?f property:located_next_to_body_of_water ?s . ?f rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:waterway } } GROUP BY ?f } . FILTER ( ?w = ?x ) . { SELECT DISTINCT ( MAX ( ?h ) AS ?x ) { SELECT DISTINCT ?t ( COUNT ( ?c ) AS ?h ) WHERE { { ?t property:located_next_to_body_of_water ?c . ?t rdf:type ontology:administrative_territorial_entity . ?c rdf:type ontology:still_waters } UNION { ?t rdf:type ontology:administrative_territorial_entity . ?c rdf:type ontology:waterway . ?t property:located_next_to_body_of_water ?c } } GROUP BY ?t } } }
[]
still waters waterway administrative territorial entity
Q1709
SYSTEM
Schwerin
Q1709
(c(Q56061),P206,c(Q337567)|c(Q1267889))
action argmax
action union
action find_tuple_counts
relation P206
type Q56061
type Q337567
action find_tuple_counts
relation P206
type Q56061
type Q1267889
[ANSWER] is located nearby max number of still waterss or waterways
[{'concept': 'Q56061'}, 'P206', [{'concept': 'Q337567'}, {'concept': 'Q1267889'}]]
SELECT DISTINCT ?f WHERE { { SELECT DISTINCT ?f ( COUNT ( ?s ) AS ?w ) WHERE { { ?f property:P206 ?s . ?s rdf:type ontology:Q337567 . ?f rdf:type ontology:Q56061 } UNION { ?f property:P206 ?s . ?f rdf:type ontology:Q56061 . ?s rdf:type ontology:Q1267889 } } GROUP BY ?f } . FILTER ( ?w = ?x ) . { SELECT DISTINCT ( MAX ( ?h ) AS ?x ) { SELECT DISTINCT ?t ( COUNT ( ?c ) AS ?h ) WHERE { { ?t property:P206 ?c . ?t rdf:type ontology:Q56061 . ?c rdf:type ontology:Q337567 } UNION { ?t rdf:type ontology:Q56061 . ?c rdf:type ontology:Q1267889 . ?t property:P206 ?c } } GROUP BY ?t } } }
Schwerin
Schwerin is located nearby max number of still waterss or waterways
Schwerin
action argmax
action union
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type still waters
action find_tuple_counts
relation located next to body of water
type administrative territorial entity
type waterway
[{'concept': 'administrative territorial entity'}, 'located next to body of water', [{'concept': 'still waters'}, {'concept': 'waterway'}]]
SELECT DISTINCT ?f WHERE { { SELECT DISTINCT ?f ( COUNT ( ?s ) AS ?w ) WHERE { { ?f property:located_next_to_body_of_water ?s . ?s rdf:type ontology:still_waters . ?f rdf:type ontology:administrative_territorial_entity } UNION { ?f property:located_next_to_body_of_water ?s . ?f rdf:type ontology:administrative_territorial_entity . ?s rdf:type ontology:waterway } } GROUP BY ?f } . FILTER ( ?w = ?x ) . { SELECT DISTINCT ( MAX ( ?h ) AS ?x ) { SELECT DISTINCT ?t ( COUNT ( ?c ) AS ?h ) WHERE { { ?t property:located_next_to_body_of_water ?c . ?t rdf:type ontology:administrative_territorial_entity . ?c rdf:type ontology:still_waters } UNION { ?t rdf:type ontology:administrative_territorial_entity . ?c rdf:type ontology:waterway . ?t property:located_next_to_body_of_water ?c } } GROUP BY ?t } } }
[]