class SqlStatisticsCommands implements SqlCommand {
    /** Schema name. */
    private String schemaName;

    /** Targets to process. */
    protected List<StatisticsTarget> targets = new ArrayList<>();

    /** */
    protected SqlStatisticsCommands() {
        // No-op.
    }

    /** */
    protected SqlStatisticsCommands(Collection<StatisticsTarget> targets) {
        this.targets = new ArrayList<>(targets);
    }

    /** {@inheritDoc} */
    @Override public String schemaName() {
        return schemaName;
    }

    /** {@inheritDoc} */
    @Override public void schemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    /**
     * @return Analyze targets.
     */
    public Collection<StatisticsTarget> targets() {
        return Collections.unmodifiableList(targets);
    }

    /** {@inheritDoc} */
    @Override public SqlCommand parse(SqlLexer lex) {
        while (true) {

            SqlQualifiedName tblQName = parseQualifiedIdentifier(lex);

            String[] cols = parseColumnList(lex, false);

            targets.add(new StatisticsTarget(tblQName.schemaName(), tblQName.name(), cols));

            if (tryEnd(lex))
                return this;
        }
    }

    /**
     * Test if it is the end of command.
     *
     * @param lex Sql lexer.
     * @return {@code true} if end of command found, {@code false} - otherwise.
     */
    protected boolean tryEnd(SqlLexer lex) {
        return !lex.shift() || lex.tokenType() == SqlLexerTokenType.SEMICOLON;
    }

    /**
     * @param lex Lexer.
     * @param allowParams If {@code true} - allow params instead columns list.
     */
    protected String[] parseColumnList(SqlLexer lex, boolean allowParams) {
        SqlLexerToken nextTok = lex.lookAhead();
        if (nextTok.token() == null || nextTok.tokenType() == SqlLexerTokenType.SEMICOLON
            || nextTok.tokenType() == SqlLexerTokenType.COMMA)
            return null;

        if (allowParams && matchesKeyword(nextTok, SqlKeyword.WITH))
            return null;

        lex.shift();

        if (lex.tokenType() != SqlLexerTokenType.PARENTHESIS_LEFT)
            throw errorUnexpectedToken(lex, "(");

        Set<String> res = new HashSet<>();

        while (true) {
            parseColumn(lex, res);

            if (skipCommaOrRightParenthesis(lex))
                break;
        }
        return (res.isEmpty()) ? null : res.toArray(new String[0]);
    }

    /**
     * Parse column name.
     *
     * @param lex Lexer.
     */
    private void parseColumn(SqlLexer lex, Set<String> cols) {<FILL_FUNCTION_BODY>}
}

        String name = parseIdentifier(lex);
        if (!cols.add(name))
            throw error(lex, "Column " + name + " already defined.");
    
<no_super_class>