Simple Question (Direct)
Simple Question
Q229867
P26
Q502895
USER
Which person is married to Elisabeth Farnesio ?
(Q229867,P26,c(Q502895))
action filter_type
action find
entity Q229867
relation P26
type Q502895
['Q229867', 'P26', {'concept': 'Q502895'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q502895 . resource:Q229867 property:P26 ?d }
Elisabeth Farnesio
action filter_type
action find
entity Elisabeth Farnesio
relation spouse
type common name
['Elisabeth Farnesio', 'spouse', {'concept': 'common name'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:common_name . resource:Elisabeth_Farnesio property:spouse ?d }
[]
common name
Q170467
SYSTEM
Philip V of Spain
Q170467
(Q229867,P26,c(Q502895))
action filter_type
action find
entity Q229867
relation P26
type Q502895
[ANSWER] is married to Elisabeth Farnesio
['Q229867', 'P26', {'concept': 'Q502895'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:Q502895 . resource:Q229867 property:P26 ?d }
Philip V of Spain
Philip V of Spain is married to Elisabeth Farnesio
Philip V of Spain
action filter_type
action find
entity Elisabeth Farnesio
relation spouse
type common name
['Elisabeth Farnesio', 'spouse', {'concept': 'common name'}]
SELECT DISTINCT ?d WHERE { ?d rdf:type ontology:common_name . resource:Elisabeth_Farnesio property:spouse ?d }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q229867
P40
Q502895
USER
Whose child are Elisabeth Farnesio ?
(c(Q502895),P40,Q229867)
action filter_type
action find_reverse
entity Q229867
relation P40
type Q502895
[{'concept': 'Q502895'}, 'P40', 'Q229867']
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q502895 . ?u property:P40 resource:Q229867 }
Elisabeth Farnesio
action filter_type
action find_reverse
entity Elisabeth Farnesio
relation child
type common name
[{'concept': 'common name'}, 'child', 'Elisabeth Farnesio']
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:common_name . ?u property:child resource:Elisabeth_Farnesio }
[]
common name
Q964936 Q60431
SYSTEM
Odoardo Farnese, Hereditary Prince of Parma, Countess Palatine Dorothea Sophie of Neuburg
Q964936 Q60431
(c(Q502895),P40,Q229867)
action filter_type
action find_reverse
entity Q229867
relation P40
type Q502895
[ANSWERS] are Elisabeth Farnesio
[{'concept': 'Q502895'}, 'P40', 'Q229867']
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q502895 . ?u property:P40 resource:Q229867 }
Odoardo Farnese, Hereditary Prince of Parma Countess Palatine Dorothea Sophie of Neuburg
Odoardo Farnese, Hereditary Prince of Parma and Countess Palatine Dorothea Sophie of Neuburg are Elisabeth Farnesio
Odoardo Farnese, Hereditary Prince of Parma Countess Palatine Dorothea Sophie of Neuburg
action filter_type
action find_reverse
entity Elisabeth Farnesio
relation child
type common name
[{'concept': 'common name'}, 'child', 'Elisabeth Farnesio']
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:common_name . ?u property:child resource:Elisabeth_Farnesio }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q964936
P7
Q502895
USER
Which people are the brothers of Odoardo Farnese, Hereditary Prince of Parma ?
(Q964936,P7,c(Q502895))
action filter_type
action find
entity Q964936
relation P7
type Q502895
['Q964936', 'P7', {'concept': 'Q502895'}]
SELECT DISTINCT ?l WHERE { resource:Q964936 property:P7 ?l . ?l rdf:type ontology:Q502895 }
Odoardo Farnese, Hereditary Prince of Parma
action filter_type
action find
entity Odoardo Farnese, Hereditary Prince of Parma
relation brother
type common name
['Odoardo Farnese, Hereditary Prince of Parma', 'brother', {'concept': 'common name'}]
SELECT DISTINCT ?l WHERE { resource:Odoardo_Farnese,_Hereditary_Prince_of_Parma property:brother ?l . ?l rdf:type ontology:common_name }
[]
common name
Q548485 Q555354
SYSTEM
Antonio Farnese, Duke of Parma, Francesco Farnese, Duke of Parma
Q548485 Q555354
(Q964936,P7,c(Q502895))
action filter_type
action find
entity Q964936
relation P7
type Q502895
[ANSWERS]
['Q964936', 'P7', {'concept': 'Q502895'}]
SELECT DISTINCT ?l WHERE { resource:Q964936 property:P7 ?l . ?l rdf:type ontology:Q502895 }
Antonio Farnese, Duke of Parma Francesco Farnese, Duke of Parma
Antonio Farnese, Duke of Parma and Francesco Farnese, Duke of Parma are the brothers of Odoardo Farnese, Hereditary Prince of Parma
Antonio Farnese, Duke of Parma Francesco Farnese, Duke of Parma
action filter_type
action find
entity Odoardo Farnese, Hereditary Prince of Parma
relation brother
type common name
['Odoardo Farnese, Hereditary Prince of Parma', 'brother', {'concept': 'common name'}]
SELECT DISTINCT ?l WHERE { resource:Odoardo_Farnese,_Hereditary_Prince_of_Parma property:brother ?l . ?l rdf:type ontology:common_name }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q14864943 Q548485
P19 P1383
Q56061
USER
Which administrative territories were Antonio Farnese, Duke of Parma born in or are in Trennfeld ?
OR((Q548485,P19,c(Q56061)), (Q14864943,P1383,c(Q56061)))
action filter_type
action union
action find
entity Q548485
relation P19
action find
entity Q14864943
relation P1383
type Q56061
{'OR': [['Q548485', 'P19', {'concept': 'Q56061'}], ['Q14864943', 'P1383', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Q548485 property:P19 ?q } UNION { resource:Q14864943 property:P1383 ?q } } . ?q rdf:type ontology:Q56061 }
Trennfeld Antonio Farnese, Duke of Parma
action filter_type
action union
action find
entity Antonio Farnese, Duke of Parma
relation place of birth
action find
entity Trennfeld
relation contains settlement
type administrative territorial entity
{'OR': [['Antonio Farnese, Duke of Parma', 'place of birth', {'concept': 'administrative territorial entity'}], ['Trennfeld', 'contains settlement', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Antonio_Farnese,_Duke_of_Parma property:place_of_birth ?q } UNION { resource:Trennfeld property:contains_settlement ?q } } . ?q rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q2683 Q21716926
SYSTEM
Parma, Trennfeld-Bahnhof
Q2683 Q21716926
OR((Q548485,P19,c(Q56061)), (Q14864943,P1383,c(Q56061)))
action filter_type
action union
action find
entity Q548485
relation P19
action find
entity Q14864943
relation P1383
type Q56061
Antonio Farnese , Duke of Parma were born in are of [ANSWERS] in Trennfeld
{'OR': [['Q548485', 'P19', {'concept': 'Q56061'}], ['Q14864943', 'P1383', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Q548485 property:P19 ?q } UNION { resource:Q14864943 property:P1383 ?q } } . ?q rdf:type ontology:Q56061 }
Parma Trennfeld-Bahnhof
Antonio Farnese , Duke of Parma were born in are of Parma and Trennfeld-Bahnhof in Trennfeld
Parma Trennfeld-Bahnhof
action filter_type
action union
action find
entity Antonio Farnese, Duke of Parma
relation place of birth
action find
entity Trennfeld
relation contains settlement
type administrative territorial entity
{'OR': [['Antonio Farnese, Duke of Parma', 'place of birth', {'concept': 'administrative territorial entity'}], ['Trennfeld', 'contains settlement', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?q WHERE { { { resource:Antonio_Farnese,_Duke_of_Parma property:place_of_birth ?q } UNION { resource:Trennfeld property:contains_settlement ?q } } . ?q rdf:type ontology:administrative_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q14874837 Q14864943
P47
Q486972
USER
Which human settlements have an adjacent border with Trennfeld or Lake District, Edmonton ?
OR((c(Q486972),P47,Q14864943), (c(Q486972),P47,Q14874837))
action filter_type
action union
action find_reverse
entity Q14864943
relation P47
action find_reverse
entity Q14874837
relation P47
type Q486972
{'OR': [[{'concept': 'Q486972'}, 'P47', 'Q14864943'], [{'concept': 'Q486972'}, 'P47', 'Q14874837']]}
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:Q486972 . { VALUES ( ?r ) { ( resource:Q14864943 ) ( resource:Q14874837 ) } . ?w property:P47 ?r } }
Lake District, Edmonton Trennfeld
action filter_type
action union
action find_reverse
entity Trennfeld
relation shares border with
action find_reverse
entity Lake District, Edmonton
relation shares border with
type human settlement
{'OR': [[{'concept': 'human settlement'}, 'shares border with', 'Trennfeld'], [{'concept': 'human settlement'}, 'shares border with', 'Lake District, Edmonton']]}
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:human_settlement . { VALUES ( ?r ) { ( resource:Trennfeld ) ( resource:Lake_District,_Edmonton ) } . ?w property:shares_border_with ?r } }
[]
human settlement
Q14866511 Q1817663 Q16588786 Q7194460 Q16854612 Q16267371 Q14866488 Q1529710 Q16266646
SYSTEM
Homburg am Main, Lengfurt, Altfeld, Pilot Sound, Edmonton, Marktheidenfeld, Kreuzwertheim, Rettersheim, Glasofen, Unterwittbach
Q14866511 Q1817663 Q16588786 Q7194460 Q16854612 Q16267371 Q14866488 Q1529710 Q16266646
OR((c(Q486972),P47,Q14864943), (c(Q486972),P47,Q14874837))
action filter_type
action union
action find_reverse
entity Q14864943
relation P47
action find_reverse
entity Q14874837
relation P47
type Q486972
[ANSWERS] have an adjacent border with Trennfeld or Lake District, Edmonton
{'OR': [[{'concept': 'Q486972'}, 'P47', 'Q14864943'], [{'concept': 'Q486972'}, 'P47', 'Q14874837']]}
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:Q486972 . { VALUES ( ?r ) { ( resource:Q14864943 ) ( resource:Q14874837 ) } . ?w property:P47 ?r } }
Homburg am Main Lengfurt Altfeld Pilot Sound, Edmonton Marktheidenfeld Kreuzwertheim Rettersheim Glasofen Unterwittbach
Homburg am Main, Lengfurt, Altfeld, Pilot Sound, Edmonton, Marktheidenfeld, Kreuzwertheim, Rettersheim, Glasofen and Unterwittbach have an adjacent border with Trennfeld or Lake District, Edmonton
Homburg am Main Lengfurt Altfeld Pilot Sound, Edmonton Marktheidenfeld Kreuzwertheim Rettersheim Glasofen Unterwittbach
action filter_type
action union
action find_reverse
entity Trennfeld
relation shares border with
action find_reverse
entity Lake District, Edmonton
relation shares border with
type human settlement
{'OR': [[{'concept': 'human settlement'}, 'shares border with', 'Trennfeld'], [{'concept': 'human settlement'}, 'shares border with', 'Lake District, Edmonton']]}
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:human_settlement . { VALUES ( ?r ) { ( resource:Trennfeld ) ( resource:Lake_District,_Edmonton ) } . ?w property:shares_border_with ?r } }
[]
Logical Reasoning (All)
Logical|Intersection|Multiple_Relation
Q183 Q16588786
P47 P17
Q486972
USER
Which human settlements do Altfeld share a border with and are located in Germany ?
AND((c(Q486972),P47,Q16588786), (c(Q486972),P17,Q183))
action filter_type
action intersection
action find_reverse
entity Q16588786
relation P47
action find_reverse
entity Q183
relation P17
type Q486972
{'AND': [[{'concept': 'Q486972'}, 'P47', 'Q16588786'], [{'concept': 'Q486972'}, 'P17', 'Q183']]}
SELECT DISTINCT ?l WHERE { ?l property:P47 resource:Q16588786 . ?l property:P17 resource:Q183 . ?l rdf:type ontology:Q486972 }
Germany Altfeld
action filter_type
action intersection
action find_reverse
entity Altfeld
relation shares border with
action find_reverse
entity Germany
relation country
type human settlement
{'AND': [[{'concept': 'human settlement'}, 'shares border with', 'Altfeld'], [{'concept': 'human settlement'}, 'country', 'Germany']]}
SELECT DISTINCT ?l WHERE { ?l property:shares_border_with resource:Altfeld . ?l property:country resource:Germany . ?l rdf:type ontology:human_settlement }
[]
human settlement
Q14866488 Q1931183 Q1529710 Q16855413 Q14864943
SYSTEM
Rettersheim, Michelrieth, Glasofen, Oberwittbach, Trennfeld
Q14866488 Q1931183 Q1529710 Q16855413 Q14864943
AND((c(Q486972),P47,Q16588786), (c(Q486972),P17,Q183))
action filter_type
action intersection
action find_reverse
entity Q16588786
relation P47
action find_reverse
entity Q183
relation P17
type Q486972
[ANSWERS] Altfeld share a border with
{'AND': [[{'concept': 'Q486972'}, 'P47', 'Q16588786'], [{'concept': 'Q486972'}, 'P17', 'Q183']]}
SELECT DISTINCT ?l WHERE { ?l property:P47 resource:Q16588786 . ?l property:P17 resource:Q183 . ?l rdf:type ontology:Q486972 }
Rettersheim Michelrieth Glasofen Oberwittbach Trennfeld
Rettersheim, Michelrieth, Glasofen, Oberwittbach and Trennfeld Altfeld share a border with
Rettersheim Michelrieth Glasofen Oberwittbach Trennfeld
action filter_type
action intersection
action find_reverse
entity Altfeld
relation shares border with
action find_reverse
entity Germany
relation country
type human settlement
{'AND': [[{'concept': 'human settlement'}, 'shares border with', 'Altfeld'], [{'concept': 'human settlement'}, 'country', 'Germany']]}
SELECT DISTINCT ?l WHERE { ?l property:shares_border_with resource:Altfeld . ?l property:country resource:Germany . ?l rdf:type ontology:human_settlement }
[]
Simple Question (Ellipsis)
Incomplete|object parent is changed, subject and predicate remain same
Q183
Q1048835
USER
And which political territory?
(Q183,P47,c(Q1048835))
action filter_type
action find
entity Q183
relation P47
type Q1048835
['Q183', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?x WHERE { resource:Q183 property:P47 ?x . ?x rdf:type ontology:Q1048835 }
Germany
action filter_type
action find
entity Germany
relation shares border with
type political territorial entity
['Germany', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?x WHERE { resource:Germany property:shares_border_with ?x . ?x rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q40 Q35
SYSTEM
Austria, Denmark
Q40 Q35
(Q183,P47,c(Q1048835))
action filter_type
action find
entity Q183
relation P47
type Q1048835
[ANSWERS]
['Q183', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?x WHERE { resource:Q183 property:P47 ?x . ?x rdf:type ontology:Q1048835 }
Austria Denmark
Austria Denmark
action filter_type
action find
entity Germany
relation shares border with
type political territorial entity
['Germany', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?x WHERE { resource:Germany property:shares_border_with ?x . ?x rdf:type ontology:political_territorial_entity }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Mult. entity type
Q183 Q16161
P1376
Q56061
USER
How many administrative territories are the county seat for Germany or Province of Como ?
(c(Q56061),P1376,Q183) (c(Q56061),P1376,Q16161)
action count
action union
action filter_type
action find_reverse
entity Q183
relation P1376
type Q56061
action filter_type
action find_reverse
entity Q16161
relation P1376
type Q56061
[{'concept': 'Q56061'}, 'P1376', 'Q183'] [{'concept': 'Q56061'}, 'P1376', 'Q16161']
SELECT DISTINCT ( COUNT ( ?f ) AS ?z ) WHERE { VALUES ( ?n ) { ( resource:Q16161 ) ( resource:Q183 ) } . ?f property:P1376 ?n }
Germany Province of Como
action count
action union
action filter_type
action find_reverse
entity Germany
relation capital of
type administrative territorial entity
action filter_type
action find_reverse
entity Province of Como
relation capital of
type administrative territorial entity
[{'concept': 'administrative territorial entity'}, 'capital of', 'Germany'] [{'concept': 'administrative territorial entity'}, 'capital of', 'Province of Como']
SELECT DISTINCT ( COUNT ( ?f ) AS ?z ) WHERE { VALUES ( ?n ) { ( resource:Province_of_Como ) ( resource:Germany ) } . ?f property:capital_of ?n }
[]
administrative territorial entity
SYSTEM
3
Q64 Q1308 Q586
(c(Q56061),P1376,Q183) (c(Q56061),P1376,Q16161)
action count
action union
action filter_type
action find_reverse
entity Q183
relation P1376
type Q56061
action filter_type
action find_reverse
entity Q16161
relation P1376
type Q56061
[ANSWER]
[{'concept': 'Q56061'}, 'P1376', 'Q183'] [{'concept': 'Q56061'}, 'P1376', 'Q16161']
SELECT DISTINCT ( COUNT ( ?f ) AS ?z ) WHERE { VALUES ( ?n ) { ( resource:Q16161 ) ( resource:Q183 ) } . ?f property:P1376 ?n }
Berlin Como Bonn
3
action count
action union
action filter_type
action find_reverse
entity Germany
relation capital of
type administrative territorial entity
action filter_type
action find_reverse
entity Province of Como
relation capital of
type administrative territorial entity
[{'concept': 'administrative territorial entity'}, 'capital of', 'Germany'] [{'concept': 'administrative territorial entity'}, 'capital of', 'Province of Como']
SELECT DISTINCT ( COUNT ( ?f ) AS ?z ) WHERE { VALUES ( ?n ) { ( resource:Province_of_Como ) ( resource:Germany ) } . ?f property:capital_of ?n }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q183
P85
Q7725634
USER
What is the national anthem of that political territory ?
action filter_type
action find
entity Q183
relation P85
type Q7725634
SELECT DISTINCT ?s WHERE { resource:Q183 property:P85 ?s . ?s rdf:type ontology:Q7725634 }
Germany
action filter_type
action find
entity Germany
relation anthem
type literary work
SELECT DISTINCT ?s WHERE { resource:Germany property:anthem ?s . ?s rdf:type ontology:literary_work }
[]
literary work
Q44042
SYSTEM
Das Lied der Deutschen
Q44042
action filter_type
action find
entity Q183
relation P85
type Q7725634
The national anthem of that political territory is [ANSWER]
SELECT DISTINCT ?s WHERE { resource:Q183 property:P85 ?s . ?s rdf:type ontology:Q7725634 }
Das Lied der Deutschen
The national anthem of that political territory is Das Lied der Deutschen
Das Lied der Deutschen
action filter_type
action find
entity Germany
relation anthem
type literary work
SELECT DISTINCT ?s WHERE { resource:Germany property:anthem ?s . ?s rdf:type ontology:literary_work }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P417
Q1445650 Q502895 Q56061
USER
Which administrative territories have max number of holidays and people as their patron saint ?
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action argmax
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ?s WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { VALUES ( ?e ) { ( ontology:Q502895 ) ( ontology:Q1445650 ) } . ?g rdf:type ?e } GROUP BY ?k } } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?n ) ?s WHERE { { ?s property:P417 ?v . ?s rdf:type ontology:Q56061 . ?v rdf:type ontology:Q1445650 } UNION { ?s property:P417 ?v . ?v rdf:type ontology:Q502895 . ?s rdf:type ontology:Q56061 } } GROUP BY ?s } . FILTER ( ?n = ?d ) }
action argmax
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ?s WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { VALUES ( ?e ) { ( ontology:common_name ) ( ontology:holiday ) } . ?g rdf:type ?e } GROUP BY ?k } } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?n ) ?s WHERE { { ?s property:patron_saint ?v . ?s rdf:type ontology:administrative_territorial_entity . ?v rdf:type ontology:holiday } UNION { ?s property:patron_saint ?v . ?v rdf:type ontology:common_name . ?s rdf:type ontology:administrative_territorial_entity } } GROUP BY ?s } . FILTER ( ?n = ?d ) }
[]
holiday common name administrative territorial entity
Q39519 Q220
SYSTEM
Brinzio, Rome
Q39519 Q220
(c(Q56061),P417,c(Q1445650)|c(Q502895))
action argmax
action union
action find_tuple_counts
relation P417
type Q56061
type Q1445650
action find_tuple_counts
relation P417
type Q56061
type Q502895
[ANSWERS] have max number of holidays and people as their patron saint
[{'concept': 'Q56061'}, 'P417', [{'concept': 'Q1445650'}, {'concept': 'Q502895'}]]
SELECT DISTINCT ?s WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { VALUES ( ?e ) { ( ontology:Q502895 ) ( ontology:Q1445650 ) } . ?g rdf:type ?e } GROUP BY ?k } } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?n ) ?s WHERE { { ?s property:P417 ?v . ?s rdf:type ontology:Q56061 . ?v rdf:type ontology:Q1445650 } UNION { ?s property:P417 ?v . ?v rdf:type ontology:Q502895 . ?s rdf:type ontology:Q56061 } } GROUP BY ?s } . FILTER ( ?n = ?d ) }
Brinzio Rome
Brinzio and Rome have max number of holidays and people as their patron saint
Brinzio Rome
action argmax
action union
action find_tuple_counts
relation patron saint
type administrative territorial entity
type holiday
action find_tuple_counts
relation patron saint
type administrative territorial entity
type common name
[{'concept': 'administrative territorial entity'}, 'patron saint', [{'concept': 'holiday'}, {'concept': 'common name'}]]
SELECT DISTINCT ?s WHERE { { SELECT DISTINCT ( MAX ( ?l ) AS ?d ) { SELECT DISTINCT ( COUNT ( ?g ) AS ?l ) ?k WHERE { VALUES ( ?e ) { ( ontology:common_name ) ( ontology:holiday ) } . ?g rdf:type ?e } GROUP BY ?k } } . { SELECT DISTINCT ( COUNT ( ?v ) AS ?n ) ?s WHERE { { ?s property:patron_saint ?v . ?s rdf:type ontology:administrative_territorial_entity . ?v rdf:type ontology:holiday } UNION { ?s property:patron_saint ?v . ?v rdf:type ontology:common_name . ?s rdf:type ontology:administrative_territorial_entity } } GROUP BY ?s } . FILTER ( ?n = ?d ) }
[]