I have found this query, but i'm not able what does it do. I don't know what the "^a" means, particularly.
select distinct ?type where {
dbpedia:Stephen_King a ?type .
filter not exists {
?subtype ^a dbpedia:Stephen_King ;
rdfs:subClassOf ?type .
filter ( ?subtype != ?type )
}
}