use client_from_query in rlm_sql