def build_select(query_obj):
    """
    Given a Query obj, return the corresponding sql
    """
    return build_select_query(query_obj.source, query_obj.fields, query_obj.filter, skip=query_obj.skip, \
                              limit=query_obj.limit, sort=query_obj.sort, distinct=query_obj.distinct)