public function buildSelect(Query $query) {
        return $this->renderStatement(Query::SELECT, [
            'fields' => $this->formatFields($query),
            'table' => $this->formatTable($query->getTable(), $query->getAlias()),
            'joins' => $this->formatJoins($query->getJoins()),
            'where' => $this->formatWhere($query->getWhere()),
            'groupBy' => $this->formatGroupBy($query->getGroupBy()),
            'having' => $this->formatHaving($query->getHaving()),
            'compounds' => $this->formatCompounds($query->getCompounds()),
            'orderBy' => $this->formatOrderBy($query->getOrderBy()),
            'limit' => $this->formatLimitOffset($query->getLimit(), $query->getOffset()),
        ] + $this->formatAttributes($query->getAttributes()));
    }