What is the {political party in Spain} for {secretary general} of {Mariano Rajoy}
Which political party is Mariano Rajoy the secretary common of?
Which political party is Mariano Rajoy the secretary general of?
SELECT DISTINCT ?b WHERE { ?b rdf:type ontology:political_party_in_Spain . ?b property:secretary_general resource:Mariano_Rajoy }
select distinct ?subj where { ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?subj . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P3975> . ?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q10819> . ?subj <http://www.wikidata.org/entity/P31> <http://wikidata.dbpedia.org/resource/Q6065085> } 
 select distinct ?sbj where { ?sbj wdt:P3975 wd:Q10819 . ?sbj wdt:P31 wd:Q6065085 } 