Steps to Reproduce:
Create a visual query with the below conditions:
- with instance matching song with and without references, uncheck 'Include values from subclasses of this value'
- choose AND condition, with genre matching jazz filter by only with references, uncheck 'Include values from subclasses of this value'
- choose OR condition, with genre matching rock music filter by only with references, uncheck 'Include values from subclasses of this value'
- Run the query
Actual Results:
Results showing different genre
Expected Results: The results should be filtered by jazz and rock music excluding others.
SPARQL:
SELECT DISTINCT ?item ?itemLabel WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". } { SELECT DISTINCT ?item WHERE { ?item (p:P31/ps:P31) wd:Q7366. { ?item p:P136 ?statement0. } UNION { ?statement0 (ps:P136) wd:Q8341. } UNION { FILTER(EXISTS { ?statement0 prov:wasDerivedFrom ?reference. }) } UNION { ?item p:P136 ?statement1. } UNION { ?statement1 (ps:P136) wd:Q11399. } UNION { FILTER(EXISTS { ?statement1 prov:wasDerivedFrom ?reference. }) } } LIMIT 10 } }