to_query usage