get_query for assign to