what is the {language of work or name} for {Tuesday} has {named after} as {3} ?
Where does Tuesday get its name from?
what is Tuesday named after?
SELECT ?y WHERE { resource:Tuesday property:named_after ?z . ?z property:language_of_work_or_name ?y . ?z property:named_after resource:3 }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q127> .
?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/Q201> .
?statement <http://www.wikidata.org/entity/P407> ?value. 
} 

SELECT ?value WHERE { wd:Q127 p:P138 ?s . ?s ps:P138 wd:Q201 . ?s pq:P407 ?value}