Simple Question (Direct)
Simple Question
Q18238133
P102
Q7210356
USER
Which party is Fredrik Christensson affiliated with ?
(Q18238133,P102,c(Q7210356))
action filter_type
action find
entity Q18238133
relation P102
type Q7210356
['Q18238133', 'P102', {'concept': 'Q7210356'}]
SELECT DISTINCT ?k WHERE { resource:Q18238133 property:P102 ?k . ?k rdf:type ontology:Q7210356 }
Fredrik Christensson
action filter_type
action find
entity Fredrik Christensson
relation member of political party
type political organization
['Fredrik Christensson', 'member of political party', {'concept': 'political organization'}]
SELECT DISTINCT ?k WHERE { resource:Fredrik_Christensson property:member_of_political_party ?k . ?k rdf:type ontology:political_organization }
[]
political organization
Q110832
SYSTEM
Centre Party
Q110832
(Q18238133,P102,c(Q7210356))
action filter_type
action find
entity Q18238133
relation P102
type Q7210356
Fredrik Christensson is affiliated with [ANSWER]
['Q18238133', 'P102', {'concept': 'Q7210356'}]
SELECT DISTINCT ?k WHERE { resource:Q18238133 property:P102 ?k . ?k rdf:type ontology:Q7210356 }
Centre Party
Fredrik Christensson is affiliated with Centre Party
Centre Party
action filter_type
action find
entity Fredrik Christensson
relation member of political party
type political organization
['Fredrik Christensson', 'member of political party', {'concept': 'political organization'}]
SELECT DISTINCT ?k WHERE { resource:Fredrik_Christensson property:member_of_political_party ?k . ?k rdf:type ontology:political_organization }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q110832
P488
Q502895
USER
Which person was the chairperson of that political organization ?
(Q110832,P488,c(Q502895))
action filter_type
action find
entity Q110832
relation P488
type Q502895
['Q110832', 'P488', {'concept': 'Q502895'}]
SELECT DISTINCT ?k WHERE { resource:Q110832 property:P488 ?k . ?k rdf:type ontology:Q502895 }
Centre Party
action filter_type
action find
entity Centre Party
relation chairperson
type common name
['Centre Party', 'chairperson', {'concept': 'common name'}]
SELECT DISTINCT ?k WHERE { resource:Centre_Party property:chairperson ?k . ?k rdf:type ontology:common_name }
[]
common name
Q439393
SYSTEM
Annie Lööf
Q439393
(Q110832,P488,c(Q502895))
action filter_type
action find
entity Q110832
relation P488
type Q502895
[ANSWER] was the chairperson of that political organization
['Q110832', 'P488', {'concept': 'Q502895'}]
SELECT DISTINCT ?k WHERE { resource:Q110832 property:P488 ?k . ?k rdf:type ontology:Q502895 }
Annie Lööf
Annie Lööf was the chairperson of that political organization
Annie Lööf
action filter_type
action find
entity Centre Party
relation chairperson
type common name
['Centre Party', 'chairperson', {'concept': 'common name'}]
SELECT DISTINCT ?k WHERE { resource:Centre_Party property:chairperson ?k . ?k rdf:type ontology:common_name }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Single entity type
P1303
Q34379 Q502895
USER
Which musical instruments can min number of people perform with ?
(c(Q502895),P1303,Q3623688)
action argmin
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
[{'concept': 'Q502895'}, 'P1303', 'Q3623688']
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MIN ( ?a ) AS ?g ) { SELECT DISTINCT ?r ( COUNT ( ?j ) AS ?a ) WHERE { ?r rdf:type ontology:Q34379 . ?j rdf:type ontology:Q502895 . ?j property:P1303 ?r } GROUP BY ?r } } . { SELECT DISTINCT ?t ( COUNT ( ?y ) AS ?n ) WHERE { ?y property:P1303 ?t . ?y rdf:type ontology:Q502895 . ?t rdf:type ontology:Q34379 } GROUP BY ?t } . FILTER ( ?n = ?g ) }
action argmin
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
[{'concept': 'common name'}, 'instrument', 'Paraguayan harp']
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MIN ( ?a ) AS ?g ) { SELECT DISTINCT ?r ( COUNT ( ?j ) AS ?a ) WHERE { ?r rdf:type ontology:musical_instrument . ?j rdf:type ontology:common_name . ?j property:instrument ?r } GROUP BY ?r } } . { SELECT DISTINCT ?t ( COUNT ( ?y ) AS ?n ) WHERE { ?y property:instrument ?t . ?y rdf:type ontology:common_name . ?t rdf:type ontology:musical_instrument } GROUP BY ?t } . FILTER ( ?n = ?g ) }
[]
musical instrument common name
Q1879664 Q748455 Q173453
SYSTEM
spoon, cajón, wind instrument
Q1879664 Q748455 Q173453
(c(Q502895),P1303,Q3623688)
action argmin
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
Min number of people can perform the [ANSWERS]
[{'concept': 'Q502895'}, 'P1303', 'Q3623688']
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MIN ( ?a ) AS ?g ) { SELECT DISTINCT ?r ( COUNT ( ?j ) AS ?a ) WHERE { ?r rdf:type ontology:Q34379 . ?j rdf:type ontology:Q502895 . ?j property:P1303 ?r } GROUP BY ?r } } . { SELECT DISTINCT ?t ( COUNT ( ?y ) AS ?n ) WHERE { ?y property:P1303 ?t . ?y rdf:type ontology:Q502895 . ?t rdf:type ontology:Q34379 } GROUP BY ?t } . FILTER ( ?n = ?g ) }
spoon cajón wind instrument
Min number of people can perform the spoon, cajón and wind instrument
spoon cajón wind instrument
action argmin
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
[{'concept': 'common name'}, 'instrument', 'Paraguayan harp']
SELECT DISTINCT ?t WHERE { { SELECT DISTINCT ( MIN ( ?a ) AS ?g ) { SELECT DISTINCT ?r ( COUNT ( ?j ) AS ?a ) WHERE { ?r rdf:type ontology:musical_instrument . ?j rdf:type ontology:common_name . ?j property:instrument ?r } GROUP BY ?r } } . { SELECT DISTINCT ?t ( COUNT ( ?y ) AS ?n ) WHERE { ?y property:instrument ?t . ?y rdf:type ontology:common_name . ?t rdf:type ontology:musical_instrument } GROUP BY ?t } . FILTER ( ?n = ?g ) }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q439393
P21
Q290
USER
Which sex does Annie Lööf possess ?
(Q439393,P21,c(Q290))
action filter_type
action find
entity Q439393
relation P21
type Q290
['Q439393', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?j WHERE { resource:Q439393 property:P21 ?j . ?j rdf:type ontology:Q290 }
Annie Lööf
action filter_type
action find
entity Annie Lööf
relation gender
type sex
['Annie Lööf', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?j WHERE { resource:Annie_Lööf property:gender ?j . ?j rdf:type ontology:sex }
[]
sex
Q6581072
SYSTEM
female
Q6581072
(Q439393,P21,c(Q290))
action filter_type
action find
entity Q439393
relation P21
type Q290
Annie Lööf possesses a [ANSWER]
['Q439393', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?j WHERE { resource:Q439393 property:P21 ?j . ?j rdf:type ontology:Q290 }
female
Annie Lööf possesses a female
female
action filter_type
action find
entity Annie Lööf
relation gender
type sex
['Annie Lööf', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?j WHERE { resource:Annie_Lööf property:gender ?j . ?j rdf:type ontology:sex }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q439393
P40
Q502895
USER
Which person has that one as an offspring ?
(c(Q502895),P40,Q6581072)
action filter_type
action find_reverse
entity Q439393
relation P40
type Q502895
[{'concept': 'Q502895'}, 'P40', 'Q6581072']
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:Q502895 . ?w property:P40 resource:Q439393 }
Annie Lööf
action filter_type
action find_reverse
entity Annie Lööf
relation child
type common name
[{'concept': 'common name'}, 'child', 'female']
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:common_name . ?w property:child resource:Annie_Lööf }
[]
common name
Q617073
SYSTEM
Hans-Göran Johansson
Q617073
(c(Q502895),P40,Q6581072)
action filter_type
action find_reverse
entity Q439393
relation P40
type Q502895
[ANSWER] has that one as an offspring
[{'concept': 'Q502895'}, 'P40', 'Q6581072']
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:Q502895 . ?w property:P40 resource:Q439393 }
Hans-Göran Johansson
Hans-Göran Johansson has that one as an offspring
Hans-Göran Johansson
action filter_type
action find_reverse
entity Annie Lööf
relation child
type common name
[{'concept': 'common name'}, 'child', 'female']
SELECT DISTINCT ?w WHERE { ?w rdf:type ontology:common_name . ?w property:child resource:Annie_Lööf }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q110832
P463
Q7278
USER
Which organization was Centre Party a member of ?
(Q110832,P463,c(Q7278))
action filter_type
action find
entity Q110832
relation P463
type Q7278
['Q110832', 'P463', {'concept': 'Q7278'}]
SELECT DISTINCT ?x WHERE { resource:Q110832 property:P463 ?x . ?x rdf:type ontology:Q7278 }
Centre Party
action filter_type
action find
entity Centre Party
relation member of
type political party
['Centre Party', 'member of', {'concept': 'political party'}]
SELECT DISTINCT ?x WHERE { resource:Centre_Party property:member_of ?x . ?x rdf:type ontology:political_party }
[]
political party
Q25079
SYSTEM
Alliance of Liberals and Democrats for Europe Party
Q25079
(Q110832,P463,c(Q7278))
action filter_type
action find
entity Q110832
relation P463
type Q7278
Party [ANSWER] was Centre Party a member of
['Q110832', 'P463', {'concept': 'Q7278'}]
SELECT DISTINCT ?x WHERE { resource:Q110832 property:P463 ?x . ?x rdf:type ontology:Q7278 }
Alliance of Liberals and Democrats for Europe Party
Party Alliance of Liberals and Democrats for Europe Party was Centre Party a member of
Alliance of Liberals and Democrats for Europe Party
action filter_type
action find
entity Centre Party
relation member of
type political party
['Centre Party', 'member of', {'concept': 'political party'}]
SELECT DISTINCT ?x WHERE { resource:Centre_Party property:member_of ?x . ?x rdf:type ontology:political_party }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q110832
P1142
Q1047113
USER
Which special field is the political ideology of Centre Party ?
(Q110832,P1142,c(Q1047113))
action filter_type
action find
entity Q110832
relation P1142
type Q1047113
['Q110832', 'P1142', {'concept': 'Q1047113'}]
SELECT DISTINCT ?s WHERE { resource:Q110832 property:P1142 ?s . ?s rdf:type ontology:Q1047113 }
Centre Party
action filter_type
action find
entity Centre Party
relation political ideology
type special field
['Centre Party', 'political ideology', {'concept': 'special field'}]
SELECT DISTINCT ?s WHERE { resource:Centre_Party property:political_ideology ?s . ?s rdf:type ontology:special_field }
[]
special field
Q6216
SYSTEM
liberalism
Q6216
(Q110832,P1142,c(Q1047113))
action filter_type
action find
entity Q110832
relation P1142
type Q1047113
Party [ANSWER] is the political ideology of Centre Party
['Q110832', 'P1142', {'concept': 'Q1047113'}]
SELECT DISTINCT ?s WHERE { resource:Q110832 property:P1142 ?s . ?s rdf:type ontology:Q1047113 }
liberalism
Party liberalism is the political ideology of Centre Party
liberalism
action filter_type
action find
entity Centre Party
relation political ideology
type special field
['Centre Party', 'political ideology', {'concept': 'special field'}]
SELECT DISTINCT ?s WHERE { resource:Centre_Party property:political_ideology ?s . ?s rdf:type ontology:special_field }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type
Q376680
P1995
Q1047113 Q12136 Q2057971
USER
How many special fields are the medical specialities of approximately the same number of diseases or health problems as traumatology ?
(c(Q12136)|c(Q2057971),P1995,c(Q1047113))
action count
action approx
action union
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q12136
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q2057971
action count
action filter_multi_types
action find_reverse
entity Q376680
relation P1995
type Q12136
type Q2057971
[[{'concept': 'Q12136'}, {'concept': 'Q2057971'}], 'P1995', {'concept': 'Q1047113'}]
SELECT DISTINCT ( COUNT ( ?i ) AS ?x ) WHERE { { SELECT DISTINCT ?i ( COUNT ( ?d ) AS ?y ) WHERE { { ?i rdf:type ontology:Q1047113 . ?d rdf:type ontology:Q12136 . ?d property:P1995 ?i } UNION { ?d property:P1995 ?i . ?i rdf:type ontology:Q1047113 . ?d rdf:type ontology:Q2057971 } } GROUP BY ?i } . FILTER ( ?y = ?u ) . { SELECT DISTINCT ( COUNT ( ?r ) AS ?u ) WHERE { ?r property:P1995 resource:Q376680 . { VALUES ( ?o ) { ( ontology:Q12136 ) ( ontology:Q2057971 ) } . ?r rdf:type ?o } } } }
traumatology
action count
action approx
action union
action find_reverse_tuple_counts
relation medical specialty
type special field
type disease
action find_reverse_tuple_counts
relation medical specialty
type special field
type health problem
action count
action filter_multi_types
action find_reverse
entity traumatology
relation medical specialty
type disease
type health problem
[[{'concept': 'disease'}, {'concept': 'health problem'}], 'medical specialty', {'concept': 'special field'}]
SELECT DISTINCT ( COUNT ( ?i ) AS ?x ) WHERE { { SELECT DISTINCT ?i ( COUNT ( ?d ) AS ?y ) WHERE { { ?i rdf:type ontology:special_field . ?d rdf:type ontology:disease . ?d property:medical_specialty ?i } UNION { ?d property:medical_specialty ?i . ?i rdf:type ontology:special_field . ?d rdf:type ontology:health_problem } } GROUP BY ?i } . FILTER ( ?y = ?u ) . { SELECT DISTINCT ( COUNT ( ?r ) AS ?u ) WHERE { ?r property:medical_specialty resource:traumatology . { VALUES ( ?o ) { ( ontology:disease ) ( ontology:health_problem ) } . ?r rdf:type ?o } } } }
[]
special field disease health problem
SYSTEM
43
Q539690 Q177635 Q1207969 Q376680 Q203337 Q10384 Q499500 Q628764 Q932510 Q2861470 Q12128 Q840545 Q1501272 Q2713123 Q182442 Q180502 Q1046686 Q1898664 Q189553 Q472607 Q1318451 Q2027981 Q335057 Q615057 Q7215 Q679690 Q1221899 Q188449 Q6451760 Q80015 Q216685 Q1470093 Q18011356 Q5284418 Q744029 Q16683089 Q1498222 Q40821 Q123028 Q15218776 Q1741745 Q668064 Q683455
(c(Q12136)|c(Q2057971),P1995,c(Q1047113))
action count
action approx
action union
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q12136
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q2057971
action count
action filter_multi_types
action find_reverse
entity Q376680
relation P1995
type Q12136
type Q2057971
[ANSWER]
[[{'concept': 'Q12136'}, {'concept': 'Q2057971'}], 'P1995', {'concept': 'Q1047113'}]
SELECT DISTINCT ( COUNT ( ?i ) AS ?x ) WHERE { { SELECT DISTINCT ?i ( COUNT ( ?d ) AS ?y ) WHERE { { ?i rdf:type ontology:Q1047113 . ?d rdf:type ontology:Q12136 . ?d property:P1995 ?i } UNION { ?d property:P1995 ?i . ?i rdf:type ontology:Q1047113 . ?d rdf:type ontology:Q2057971 } } GROUP BY ?i } . FILTER ( ?y = ?u ) . { SELECT DISTINCT ( COUNT ( ?r ) AS ?u ) WHERE { ?r property:P1995 resource:Q376680 . { VALUES ( ?o ) { ( ontology:Q12136 ) ( ontology:Q2057971 ) } . ?r rdf:type ?o } } } }
angiology nephrology diabetology traumatology pulmonology geriatrics clinical pathology Occupational medicine general surgery emergency medicine dentistry sports medicine Phoniatrics phlebology plastic surgery parasitology allergology tobaccology otolaryngology Senology Transfusion medicine oral surgery Andrology anaesthesiology virology Intensive-care medicine gynaecology neurosurgery family medicine Obstetrics gynecology orthopedics bariatrics podiatry obstetrics sleep medicine endocrine oncology vascular surgery surgery pediatrics orthopedic surgery Child and adolescent psychiatry hepatology anatomical pathology
43
action count
action approx
action union
action find_reverse_tuple_counts
relation medical specialty
type special field
type disease
action find_reverse_tuple_counts
relation medical specialty
type special field
type health problem
action count
action filter_multi_types
action find_reverse
entity traumatology
relation medical specialty
type disease
type health problem
[[{'concept': 'disease'}, {'concept': 'health problem'}], 'medical specialty', {'concept': 'special field'}]
SELECT DISTINCT ( COUNT ( ?i ) AS ?x ) WHERE { { SELECT DISTINCT ?i ( COUNT ( ?d ) AS ?y ) WHERE { { ?i rdf:type ontology:special_field . ?d rdf:type ontology:disease . ?d property:medical_specialty ?i } UNION { ?d property:medical_specialty ?i . ?i rdf:type ontology:special_field . ?d rdf:type ontology:health_problem } } GROUP BY ?i } . FILTER ( ?y = ?u ) . { SELECT DISTINCT ( COUNT ( ?r ) AS ?u ) WHERE { ?r property:medical_specialty resource:traumatology . { VALUES ( ?o ) { ( ontology:disease ) ( ontology:health_problem ) } . ?r rdf:type ?o } } } }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Mult. entity type|Incomplete
Q7215
P1995
Q1047113 Q12136 Q2057971
USER
And also tell me about virology?
(c(Q12136)|c(Q2057971),P1995,c(Q1047113))
action count
action approx
action union
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q12136
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q2057971
action count
action filter_multi_types
action find_reverse
entity Q7215
relation P1995
type Q12136
type Q2057971
[[{'concept': 'Q12136'}, {'concept': 'Q2057971'}], 'P1995', {'concept': 'Q1047113'}]
SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) WHERE { { SELECT DISTINCT ?w ( COUNT ( ?j ) AS ?c ) WHERE { { ?j rdf:type ontology:Q12136 . ?w rdf:type ontology:Q1047113 . ?j property:P1995 ?w } UNION { ?j property:P1995 ?w . ?w rdf:type ontology:Q1047113 . ?j rdf:type ontology:Q2057971 } } GROUP BY ?w } . FILTER ( ?c = ?a ) . { SELECT DISTINCT ( COUNT ( ?b ) AS ?a ) WHERE { ?b property:P1995 resource:Q7215 . { ?b rdf:type ?z . VALUES ( ?z ) { ( ontology:Q12136 ) ( ontology:Q2057971 ) } } } } }
virology
action count
action approx
action union
action find_reverse_tuple_counts
relation medical specialty
type special field
type disease
action find_reverse_tuple_counts
relation medical specialty
type special field
type health problem
action count
action filter_multi_types
action find_reverse
entity virology
relation medical specialty
type disease
type health problem
[[{'concept': 'disease'}, {'concept': 'health problem'}], 'medical specialty', {'concept': 'special field'}]
SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) WHERE { { SELECT DISTINCT ?w ( COUNT ( ?j ) AS ?c ) WHERE { { ?j rdf:type ontology:disease . ?w rdf:type ontology:special_field . ?j property:medical_specialty ?w } UNION { ?j property:medical_specialty ?w . ?w rdf:type ontology:special_field . ?j rdf:type ontology:health_problem } } GROUP BY ?w } . FILTER ( ?c = ?a ) . { SELECT DISTINCT ( COUNT ( ?b ) AS ?a ) WHERE { ?b property:medical_specialty resource:virology . { ?b rdf:type ?z . VALUES ( ?z ) { ( ontology:disease ) ( ontology:health_problem ) } } } } }
[]
special field disease health problem
SYSTEM
43
Q539690 Q177635 Q1207969 Q376680 Q203337 Q10384 Q499500 Q628764 Q932510 Q2861470 Q12128 Q840545 Q1501272 Q2713123 Q182442 Q180502 Q1046686 Q1898664 Q189553 Q472607 Q1318451 Q2027981 Q335057 Q615057 Q7215 Q679690 Q1221899 Q188449 Q6451760 Q80015 Q216685 Q1470093 Q18011356 Q5284418 Q744029 Q16683089 Q1498222 Q40821 Q123028 Q15218776 Q1741745 Q668064 Q683455
(c(Q12136)|c(Q2057971),P1995,c(Q1047113))
action count
action approx
action union
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q12136
action find_reverse_tuple_counts
relation P1995
type Q1047113
type Q2057971
action count
action filter_multi_types
action find_reverse
entity Q7215
relation P1995
type Q12136
type Q2057971
[ANSWER]
[[{'concept': 'Q12136'}, {'concept': 'Q2057971'}], 'P1995', {'concept': 'Q1047113'}]
SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) WHERE { { SELECT DISTINCT ?w ( COUNT ( ?j ) AS ?c ) WHERE { { ?j rdf:type ontology:Q12136 . ?w rdf:type ontology:Q1047113 . ?j property:P1995 ?w } UNION { ?j property:P1995 ?w . ?w rdf:type ontology:Q1047113 . ?j rdf:type ontology:Q2057971 } } GROUP BY ?w } . FILTER ( ?c = ?a ) . { SELECT DISTINCT ( COUNT ( ?b ) AS ?a ) WHERE { ?b property:P1995 resource:Q7215 . { ?b rdf:type ?z . VALUES ( ?z ) { ( ontology:Q12136 ) ( ontology:Q2057971 ) } } } } }
angiology nephrology diabetology traumatology pulmonology geriatrics clinical pathology Occupational medicine general surgery emergency medicine dentistry sports medicine Phoniatrics phlebology plastic surgery parasitology allergology tobaccology otolaryngology Senology Transfusion medicine oral surgery Andrology anaesthesiology virology Intensive-care medicine gynaecology neurosurgery family medicine Obstetrics gynecology orthopedics bariatrics podiatry obstetrics sleep medicine endocrine oncology vascular surgery surgery pediatrics orthopedic surgery Child and adolescent psychiatry hepatology anatomical pathology
43
action count
action approx
action union
action find_reverse_tuple_counts
relation medical specialty
type special field
type disease
action find_reverse_tuple_counts
relation medical specialty
type special field
type health problem
action count
action filter_multi_types
action find_reverse
entity virology
relation medical specialty
type disease
type health problem
[[{'concept': 'disease'}, {'concept': 'health problem'}], 'medical specialty', {'concept': 'special field'}]
SELECT DISTINCT ( COUNT ( ?w ) AS ?q ) WHERE { { SELECT DISTINCT ?w ( COUNT ( ?j ) AS ?c ) WHERE { { ?j rdf:type ontology:disease . ?w rdf:type ontology:special_field . ?j property:medical_specialty ?w } UNION { ?j property:medical_specialty ?w . ?w rdf:type ontology:special_field . ?j rdf:type ontology:health_problem } } GROUP BY ?w } . FILTER ( ?c = ?a ) . { SELECT DISTINCT ( COUNT ( ?b ) AS ?a ) WHERE { ?b property:medical_specialty resource:virology . { ?b rdf:type ?z . VALUES ( ?z ) { ( ontology:disease ) ( ontology:health_problem ) } } } } }
[]