Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24409

NTILE example throws: ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

    XMLWordPrintable

Details

    Description

      Hi following the example of NTILE in https://mariadb.com/kb/en/ntile/

      create table t1 (
          pk int primary key,
          a int,
          b int
        );
       
      insert into t1 values
          (11 , 0, 10),
          (12 , 0, 10),
          (13 , 1, 10),
          (14 , 1, 10),
          (18 , 2, 10),
          (15 , 2, 20),
          (16 , 2, 20),
          (17 , 2, 20),
          (19 , 4, 20),
          (20 , 4, 20);
       
      select pk, a, b,
          ntile(1) over (order by pk)
        from t1;
      
      

      I get

      ERROR 1140 (42000): Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause

      This is clearly a bug in the documentation or in the mariadb server.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vasvir Vassilis Virvilis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.