select distinct ?r ?reqProp1
where {
  {
    ?r <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#messageSubject> ?v1 .
    ?v1 bif:contains "'Test*'" .
    ?r a ?v2 .
    ?v2 <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email> .
  } .
  ?r <http://akonadi-project.org/ontologies/aneo#akonadiItemId> ?reqProp1 .
}
