Simple Question (Direct)
Simple Question
Q2137986
P509
Q2057971
USER
How did Reginald Gray die ?
(Q2137986,P509,c(Q2057971))
action filter_type
action find
entity Q2137986
relation P509
type Q2057971
['Q2137986', 'P509', {'concept': 'Q2057971'}]
SELECT DISTINCT ?v WHERE { ?v rdf:type ontology:Q2057971 . resource:Q2137986 property:P509 ?v }
Reginald Gray
action filter_type
action find
entity Reginald Gray
relation cause of death
type health problem
['Reginald Gray', 'cause of death', {'concept': 'health problem'}]
SELECT DISTINCT ?v WHERE { ?v rdf:type ontology:health_problem . resource:Reginald_Gray property:cause_of_death ?v }
[]
health problem
Q189588
SYSTEM
stomach cancer
Q189588
(Q2137986,P509,c(Q2057971))
action filter_type
action find
entity Q2137986
relation P509
type Q2057971
Reginald Gray died from [ANSWER]
['Q2137986', 'P509', {'concept': 'Q2057971'}]
SELECT DISTINCT ?v WHERE { ?v rdf:type ontology:Q2057971 . resource:Q2137986 property:P509 ?v }
stomach cancer
Reginald Gray died from stomach cancer
stomach cancer
action filter_type
action find
entity Reginald Gray
relation cause of death
type health problem
['Reginald Gray', 'cause of death', {'concept': 'health problem'}]
SELECT DISTINCT ?v WHERE { ?v rdf:type ontology:health_problem . resource:Reginald_Gray property:cause_of_death ?v }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q2137986
P21
Q290
USER
What is the sex of Reginald Gray ?
(Q2137986,P21,c(Q290))
action filter_type
action find
entity Q2137986
relation P21
type Q290
['Q2137986', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?j WHERE { ?j rdf:type ontology:Q290 . resource:Q2137986 property:P21 ?j }
Reginald Gray
action filter_type
action find
entity Reginald Gray
relation gender
type sex
['Reginald Gray', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?j WHERE { ?j rdf:type ontology:sex . resource:Reginald_Gray property:gender ?j }
[]
sex
Q6581097
SYSTEM
male
Q6581097
(Q2137986,P21,c(Q290))
action filter_type
action find
entity Q2137986
relation P21
type Q290
The sex of Reginald Gray is a [ANSWER]
['Q2137986', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?j WHERE { ?j rdf:type ontology:Q290 . resource:Q2137986 property:P21 ?j }
male
The sex of Reginald Gray is a male
male
action filter_type
action find
entity Reginald Gray
relation gender
type sex
['Reginald Gray', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?j WHERE { ?j rdf:type ontology:sex . resource:Reginald_Gray property:gender ?j }
[]
Logical Reasoning (All)
Logical|Intersection|Single_Relation|Incomplete
Q21506046 Q2137986
P21
Q290
USER
And also Shane Walker
AND((Q2137986,P21,c(Q290)), (Q21506046,P21,c(Q290)))
action filter_type
action intersection
action find
entity Q2137986
relation P21
action find
entity Q21506046
relation P21
type Q290
{'AND': [['Q2137986', 'P21', {'concept': 'Q290'}], ['Q21506046', 'P21', {'concept': 'Q290'}]]}
SELECT DISTINCT ?h WHERE { resource:Q21506046 property:P21 ?h . resource:Q2137986 property:P21 ?h . ?h rdf:type ontology:Q290 }
Shane Walker Reginald Gray
action filter_type
action intersection
action find
entity Reginald Gray
relation gender
action find
entity Shane Walker
relation gender
type sex
{'AND': [['Reginald Gray', 'gender', {'concept': 'sex'}], ['Shane Walker', 'gender', {'concept': 'sex'}]]}
SELECT DISTINCT ?h WHERE { resource:Shane_Walker property:gender ?h . resource:Reginald_Gray property:gender ?h . ?h rdf:type ontology:sex }
[]
sex
Q6581097
SYSTEM
male
Q6581097
AND((Q2137986,P21,c(Q290)), (Q21506046,P21,c(Q290)))
action filter_type
action intersection
action find
entity Q2137986
relation P21
action find
entity Q21506046
relation P21
type Q290
[ANSWER]
{'AND': [['Q2137986', 'P21', {'concept': 'Q290'}], ['Q21506046', 'P21', {'concept': 'Q290'}]]}
SELECT DISTINCT ?h WHERE { resource:Q21506046 property:P21 ?h . resource:Q2137986 property:P21 ?h . ?h rdf:type ontology:Q290 }
male
male
action filter_type
action intersection
action find
entity Reginald Gray
relation gender
action find
entity Shane Walker
relation gender
type sex
{'AND': [['Reginald Gray', 'gender', {'concept': 'sex'}], ['Shane Walker', 'gender', {'concept': 'sex'}]]}
SELECT DISTINCT ?h WHERE { resource:Shane_Walker property:gender ?h . resource:Reginald_Gray property:gender ?h . ?h rdf:type ontology:sex }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q21506046
P161
Q838948
USER
What work of art has Shane Walker in its star cast ?
(c(Q838948),P161,Q6581097)
action filter_type
action find_reverse
entity Q21506046
relation P161
type Q838948
[{'concept': 'Q838948'}, 'P161', 'Q6581097']
SELECT DISTINCT ?x WHERE { ?x property:P161 resource:Q21506046 . ?x rdf:type ontology:Q838948 }
Shane Walker
action filter_type
action find_reverse
entity Shane Walker
relation cast member
type work of art
[{'concept': 'work of art'}, 'cast member', 'male']
SELECT DISTINCT ?x WHERE { ?x property:cast_member resource:Shane_Walker . ?x rdf:type ontology:work_of_art }
[]
work of art
Q901255
SYSTEM
The Guardian
Q901255
(c(Q838948),P161,Q6581097)
action filter_type
action find_reverse
entity Q21506046
relation P161
type Q838948
[ANSWER] has Shane Walker in its star cast
[{'concept': 'Q838948'}, 'P161', 'Q6581097']
SELECT DISTINCT ?x WHERE { ?x property:P161 resource:Q21506046 . ?x rdf:type ontology:Q838948 }
The Guardian
The Guardian has Shane Walker in its star cast
The Guardian
action filter_type
action find_reverse
entity Shane Walker
relation cast member
type work of art
[{'concept': 'work of art'}, 'cast member', 'male']
SELECT DISTINCT ?x WHERE { ?x property:cast_member resource:Shane_Walker . ?x rdf:type ontology:work_of_art }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q901255
P915
Q852446
USER
Which cities were that work of art filmed on ?
(Q901255,P915,c(Q852446))
action filter_type
action find
entity Q901255
relation P915
type Q852446
['Q901255', 'P915', {'concept': 'Q852446'}]
SELECT DISTINCT ?f WHERE { resource:Q901255 property:P915 ?f . ?f rdf:type ontology:Q852446 }
The Guardian
action filter_type
action find
entity The Guardian
relation filming location
type administrative territorial entity of the United States
['The Guardian', 'filming location', {'concept': 'administrative territorial entity of the United States'}]
SELECT DISTINCT ?f WHERE { resource:The_Guardian property:filming_location ?f . ?f rdf:type ontology:administrative_territorial_entity_of_the_United_States }
[]
administrative territorial entity of the United States
Q1454 Q99
SYSTEM
North Carolina, California
Q1454 Q99
(Q901255,P915,c(Q852446))
action filter_type
action find
entity Q901255
relation P915
type Q852446
That work of art were filmed in [ANSWERS]
['Q901255', 'P915', {'concept': 'Q852446'}]
SELECT DISTINCT ?f WHERE { resource:Q901255 property:P915 ?f . ?f rdf:type ontology:Q852446 }
North Carolina California
That work of art were filmed in North Carolina and California
North Carolina California
action filter_type
action find
entity The Guardian
relation filming location
type administrative territorial entity of the United States
['The Guardian', 'filming location', {'concept': 'administrative territorial entity of the United States'}]
SELECT DISTINCT ?f WHERE { resource:The_Guardian property:filming_location ?f . ?f rdf:type ontology:administrative_territorial_entity_of_the_United_States }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P1441
Q838948 Q6619679 Q502895
USER
Which works of art do max number of fictional humanoids and people appear ?
(c(Q6619679)|c(Q502895),P1441,c(Q838948))
action argmax
action union
action find_reverse_tuple_counts
relation P1441
type Q838948
type Q6619679
action find_reverse_tuple_counts
relation P1441
type Q838948
type Q502895
[[{'concept': 'Q6619679'}, {'concept': 'Q502895'}], 'P1441', {'concept': 'Q838948'}]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MAX ( ?m ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?y ) AS ?m ) ?i WHERE { { ?y property:P1441 ?i . ?i rdf:type ontology:Q838948 . ?y rdf:type ontology:Q6619679 } UNION { ?y property:P1441 ?i . ?i rdf:type ontology:Q838948 . ?y rdf:type ontology:Q502895 } } GROUP BY ?i } } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) ?j WHERE { { ?e property:P1441 ?j . ?j rdf:type ontology:Q838948 . ?e rdf:type ontology:Q6619679 } UNION { ?j rdf:type ontology:Q838948 . ?e rdf:type ontology:Q502895 . ?e property:P1441 ?j } } GROUP BY ?j } . FILTER ( ?d = ?u ) }
action argmax
action union
action find_reverse_tuple_counts
relation present in work
type work of art
type fictional humanoid
action find_reverse_tuple_counts
relation present in work
type work of art
type common name
[[{'concept': 'fictional humanoid'}, {'concept': 'common name'}], 'present in work', {'concept': 'work of art'}]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MAX ( ?m ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?y ) AS ?m ) ?i WHERE { { ?y property:present_in_work ?i . ?i rdf:type ontology:work_of_art . ?y rdf:type ontology:fictional_humanoid } UNION { ?y property:present_in_work ?i . ?i rdf:type ontology:work_of_art . ?y rdf:type ontology:common_name } } GROUP BY ?i } } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) ?j WHERE { { ?e property:present_in_work ?j . ?j rdf:type ontology:work_of_art . ?e rdf:type ontology:fictional_humanoid } UNION { ?j rdf:type ontology:work_of_art . ?e rdf:type ontology:common_name . ?e property:present_in_work ?j } } GROUP BY ?j } . FILTER ( ?d = ?u ) }
[]
work of art fictional humanoid common name
Q18407657
SYSTEM
Captain America: Civil War
Q18407657
(c(Q6619679)|c(Q502895),P1441,c(Q838948))
action argmax
action union
action find_reverse_tuple_counts
relation P1441
type Q838948
type Q6619679
action find_reverse_tuple_counts
relation P1441
type Q838948
type Q502895
[ANSWER] max number of fictional humanoids and people appear
[[{'concept': 'Q6619679'}, {'concept': 'Q502895'}], 'P1441', {'concept': 'Q838948'}]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MAX ( ?m ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?y ) AS ?m ) ?i WHERE { { ?y property:P1441 ?i . ?i rdf:type ontology:Q838948 . ?y rdf:type ontology:Q6619679 } UNION { ?y property:P1441 ?i . ?i rdf:type ontology:Q838948 . ?y rdf:type ontology:Q502895 } } GROUP BY ?i } } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) ?j WHERE { { ?e property:P1441 ?j . ?j rdf:type ontology:Q838948 . ?e rdf:type ontology:Q6619679 } UNION { ?j rdf:type ontology:Q838948 . ?e rdf:type ontology:Q502895 . ?e property:P1441 ?j } } GROUP BY ?j } . FILTER ( ?d = ?u ) }
Captain America: Civil War
Captain America: Civil War max number of fictional humanoids and people appear
Captain America: Civil War
action argmax
action union
action find_reverse_tuple_counts
relation present in work
type work of art
type fictional humanoid
action find_reverse_tuple_counts
relation present in work
type work of art
type common name
[[{'concept': 'fictional humanoid'}, {'concept': 'common name'}], 'present in work', {'concept': 'work of art'}]
SELECT DISTINCT ?j WHERE { { SELECT DISTINCT ( MAX ( ?m ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?y ) AS ?m ) ?i WHERE { { ?y property:present_in_work ?i . ?i rdf:type ontology:work_of_art . ?y rdf:type ontology:fictional_humanoid } UNION { ?y property:present_in_work ?i . ?i rdf:type ontology:work_of_art . ?y rdf:type ontology:common_name } } GROUP BY ?i } } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) ?j WHERE { { ?e property:present_in_work ?j . ?j rdf:type ontology:work_of_art . ?e rdf:type ontology:fictional_humanoid } UNION { ?j rdf:type ontology:work_of_art . ?e rdf:type ontology:common_name . ?e property:present_in_work ?j } } GROUP BY ?j } . FILTER ( ?d = ?u ) }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Logical operators|Indirect
P840
Q7397 Q2983893
USER
How many software or urban districts are the narrative locations of that work of art ?
(Q18407657,P840,c(Q7397)) (Q18407657,P840,c(Q2983893)) (Q18407657,P840,c(Q7397)) (Q18407657,P840,c(Q2983893))
action count
action union
action filter_type
action find
entity Q18407657
relation P840
type Q7397
action filter_type
action find
entity Q18407657
relation P840
type Q2983893
['Q18407657', 'P840', {'concept': 'Q7397'}] ['Q18407657', 'P840', {'concept': 'Q2983893'}] ['Q18407657', 'P840', {'concept': 'Q7397'}] ['Q18407657', 'P840', {'concept': 'Q2983893'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?t ) WHERE { { resource:Q18407657 property:P840 ?r . ?r rdf:type ontology:Q7397 } UNION { resource:Q18407657 property:P840 ?r . ?r rdf:type ontology:Q2983893 } }
action count
action union
action filter_type
action find
entity Captain America: Civil War
relation narrative location
type software
action filter_type
action find
entity Captain America: Civil War
relation narrative location
type urban district
['Captain America: Civil War', 'narrative location', {'concept': 'software'}] ['Captain America: Civil War', 'narrative location', {'concept': 'urban district'}] ['Captain America: Civil War', 'narrative location', {'concept': 'software'}] ['Captain America: Civil War', 'narrative location', {'concept': 'urban district'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?t ) WHERE { { resource:Captain_America:_Civil_War property:narrative_location ?r . ?r rdf:type ontology:software } UNION { resource:Captain_America:_Civil_War property:narrative_location ?r . ?r rdf:type ontology:urban_district } }
[]
software urban district
SYSTEM
2
Q18424 Q1251023
(Q18407657,P840,c(Q7397)) (Q18407657,P840,c(Q2983893)) (Q18407657,P840,c(Q7397)) (Q18407657,P840,c(Q2983893))
action count
action union
action filter_type
action find
entity Q18407657
relation P840
type Q7397
action filter_type
action find
entity Q18407657
relation P840
type Q2983893
[ANSWER]
['Q18407657', 'P840', {'concept': 'Q7397'}] ['Q18407657', 'P840', {'concept': 'Q2983893'}] ['Q18407657', 'P840', {'concept': 'Q7397'}] ['Q18407657', 'P840', {'concept': 'Q2983893'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?t ) WHERE { { resource:Q18407657 property:P840 ?r . ?r rdf:type ontology:Q7397 } UNION { resource:Q18407657 property:P840 ?r . ?r rdf:type ontology:Q2983893 } }
Queens Wakanda
2
action count
action union
action filter_type
action find
entity Captain America: Civil War
relation narrative location
type software
action filter_type
action find
entity Captain America: Civil War
relation narrative location
type urban district
['Captain America: Civil War', 'narrative location', {'concept': 'software'}] ['Captain America: Civil War', 'narrative location', {'concept': 'urban district'}] ['Captain America: Civil War', 'narrative location', {'concept': 'software'}] ['Captain America: Civil War', 'narrative location', {'concept': 'urban district'}]
SELECT DISTINCT ( COUNT ( ?r ) AS ?t ) WHERE { { resource:Captain_America:_Civil_War property:narrative_location ?r . ?r rdf:type ontology:software } UNION { resource:Captain_America:_Civil_War property:narrative_location ?r . ?r rdf:type ontology:urban_district } }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q18921792 Q2137986
P27
Q15617994
USER
Which administrative territories are Reginald Gray or Dhiren Gondaria a civilian of ?
OR((Q2137986,P27,c(Q15617994)), (Q18921792,P27,c(Q15617994)))
action filter_type
action union
action find
entity Q2137986
relation P27
action find
entity Q18921792
relation P27
type Q15617994
{'OR': [['Q2137986', 'P27', {'concept': 'Q15617994'}], ['Q18921792', 'P27', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?n WHERE { ?n rdf:type ontology:Q15617994 . { { resource:Q2137986 property:P27 ?n } UNION { resource:Q18921792 property:P27 ?n } } }
Dhiren Gondaria Reginald Gray
action filter_type
action union
action find
entity Reginald Gray
relation country of citizenship
action find
entity Dhiren Gondaria
relation country of citizenship
type designation for an administrative territorial entity
{'OR': [['Reginald Gray', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Dhiren Gondaria', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?n WHERE { ?n rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Reginald_Gray property:country_of_citizenship ?n } UNION { resource:Dhiren_Gondaria property:country_of_citizenship ?n } } }
[]
designation for an administrative territorial entity
Q114 Q27
SYSTEM
Kenya, Ireland
Q114 Q27
OR((Q2137986,P27,c(Q15617994)), (Q18921792,P27,c(Q15617994)))
action filter_type
action union
action find
entity Q2137986
relation P27
action find
entity Q18921792
relation P27
type Q15617994
[ANSWERS] are Reginald Gray or Dhiren Gondaria a civilian of
{'OR': [['Q2137986', 'P27', {'concept': 'Q15617994'}], ['Q18921792', 'P27', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?n WHERE { ?n rdf:type ontology:Q15617994 . { { resource:Q2137986 property:P27 ?n } UNION { resource:Q18921792 property:P27 ?n } } }
Kenya Ireland
Kenya and Ireland are Reginald Gray or Dhiren Gondaria a civilian of
Kenya Ireland
action filter_type
action union
action find
entity Reginald Gray
relation country of citizenship
action find
entity Dhiren Gondaria
relation country of citizenship
type designation for an administrative territorial entity
{'OR': [['Reginald Gray', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Dhiren Gondaria', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?n WHERE { ?n rdf:type ontology:designation_for_an_administrative_territorial_entity . { { resource:Reginald_Gray property:country_of_citizenship ?n } UNION { resource:Dhiren_Gondaria property:country_of_citizenship ?n } } }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P780
Q1441305 Q2057971 Q2057971
USER
Which health problems does presence of max number of medical signs and health problems indicate ?
(c(Q2057971),P780,c(Q1441305)|c(Q2057971))
action argmax
action union
action find_tuple_counts
relation P780
type Q2057971
type Q1441305
action find_tuple_counts
relation P780
type Q2057971
type Q2057971
[{'concept': 'Q2057971'}, 'P780', [{'concept': 'Q1441305'}, {'concept': 'Q2057971'}]]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ?e ( COUNT ( ?n ) AS ?h ) WHERE { VALUES ( ?k ) { ( ontology:Q1441305 ) ( ontology:Q2057971 ) } . ?n rdf:type ?k } GROUP BY ?e } . FILTER ( ?h = ?u ) . { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ?y ( COUNT ( ?o ) AS ?t ) WHERE { { ?y rdf:type ontology:Q2057971 . ?o rdf:type ontology:Q1441305 . ?y property:P780 ?o } UNION { ?y rdf:type ontology:Q2057971 . ?o rdf:type ontology:Q2057971 . ?y property:P780 ?o } } GROUP BY ?y } } }
action argmax
action union
action find_tuple_counts
relation symptoms
type health problem
type medical sign
action find_tuple_counts
relation symptoms
type health problem
type health problem
[{'concept': 'health problem'}, 'symptoms', [{'concept': 'medical sign'}, {'concept': 'health problem'}]]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ?e ( COUNT ( ?n ) AS ?h ) WHERE { VALUES ( ?k ) { ( ontology:medical_sign ) ( ontology:health_problem ) } . ?n rdf:type ?k } GROUP BY ?e } . FILTER ( ?h = ?u ) . { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ?y ( COUNT ( ?o ) AS ?t ) WHERE { { ?y rdf:type ontology:health_problem . ?o rdf:type ontology:medical_sign . ?y property:symptoms ?o } UNION { ?y rdf:type ontology:health_problem . ?o rdf:type ontology:health_problem . ?y property:symptoms ?o } } GROUP BY ?y } } }
[]
medical sign health problem health problem
Q221668 Q47912 Q180664
SYSTEM
acute cystitis, lung cancer, acute lymphocytic leukemia
Q719656 Q326648 Q47912 Q221668 Q180664
(c(Q2057971),P780,c(Q1441305)|c(Q2057971))
action argmax
action union
action find_tuple_counts
relation P780
type Q2057971
type Q1441305
action find_tuple_counts
relation P780
type Q2057971
type Q2057971
[ANSWERS] presence of max number of medical signs and health problems indicate
[{'concept': 'Q2057971'}, 'P780', [{'concept': 'Q1441305'}, {'concept': 'Q2057971'}]]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ?e ( COUNT ( ?n ) AS ?h ) WHERE { VALUES ( ?k ) { ( ontology:Q1441305 ) ( ontology:Q2057971 ) } . ?n rdf:type ?k } GROUP BY ?e } . FILTER ( ?h = ?u ) . { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ?y ( COUNT ( ?o ) AS ?t ) WHERE { { ?y rdf:type ontology:Q2057971 . ?o rdf:type ontology:Q1441305 . ?y property:P780 ?o } UNION { ?y rdf:type ontology:Q2057971 . ?o rdf:type ontology:Q2057971 . ?y property:P780 ?o } } GROUP BY ?y } } }
fascioliasis Salmonellosis lung cancer acute cystitis acute lymphocytic leukemia
Acute cystitis, lung cancer and acute lymphocytic leukemia presence of max number of medical signs and health problems indicate
acute cystitis lung cancer acute lymphocytic leukemia
action argmax
action union
action find_tuple_counts
relation symptoms
type health problem
type medical sign
action find_tuple_counts
relation symptoms
type health problem
type health problem
[{'concept': 'health problem'}, 'symptoms', [{'concept': 'medical sign'}, {'concept': 'health problem'}]]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ?e ( COUNT ( ?n ) AS ?h ) WHERE { VALUES ( ?k ) { ( ontology:medical_sign ) ( ontology:health_problem ) } . ?n rdf:type ?k } GROUP BY ?e } . FILTER ( ?h = ?u ) . { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ?y ( COUNT ( ?o ) AS ?t ) WHERE { { ?y rdf:type ontology:health_problem . ?o rdf:type ontology:medical_sign . ?y property:symptoms ?o } UNION { ?y rdf:type ontology:health_problem . ?o rdf:type ontology:health_problem . ?y property:symptoms ?o } } GROUP BY ?y } } }
[]