rd_query function

Identification of queries