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

GROUP BY with ORDER BY

    XMLWordPrintable

Details

    Description

      sample data: test table
      id, name, date
      1, John, 2019-03-10 16:28:58
      2, john, 2019-03-12 16:29:08

      SELECT *
      FROM
      (
      SELECT *
      FROM test
      ORDER BY DATE DESC
      ) a
      GROUP BY a.name

      The result in:
      MySQL 5.1.41
      2, john, 2019-03-12 16:29:08 - correct answer

      10.1.37-MariaDB-cll-lve - MariaDB Server
      1 John 2019-03-10 16:28:58

      I tried with GROUP BY DESC but result is same,

      Attachments

        Activity

          People

            Unassigned Unassigned
            holu112 Laszlo Holubetz
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.