what is the {language of work or name} for {Friday} has {named after} as {5} ?
Which language or work was Friday named after the number 5?
In which language or work, Friday has been named after number 5?
SELECT ?t WHERE { ?c property:language_of_work_or_name ?t . resource:Friday property:named_after ?c . ?c property:named_after resource:5 }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q130> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P138> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q203> .
?statement <http://www.wikidata.org/entity/P407> ?value. 
} 

SELECT ?value WHERE { wd:Q130 p:P138 ?s . ?s ps:P138 wd:Q203 . ?s pq:P407 ?value}