Create custom_query