retrieve_query function

Get the sparql query performed with sparql.