export build_query