prefix owl: prefix rdf: prefix : select ?X ?C ?D from where {{?X rdf:type ?C} UNION {:Union1 owl:equivalentClass ?D}}