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

Add support for PIVOT

    XMLWordPrintable

Details

    Description

      The CONNECT engine support PIVOT.
      https://mariadb.com/kb/en/mariadb/connect-table-types-pivot-table-type/

      This task is to add native support for PIVOT.

      https://technet.microsoft.com/en-us/library/ms177410%28v=sql.105%29.aspx

      Syntax:

      SELECT <non-pivoted column>,
          [first pivoted column] AS <column name>,
          [second pivoted column] AS <column name>,
          ...
          [last pivoted column] AS <column name>
      FROM
          (<SELECT query that produces the data>)
          AS <alias>
      PIVOT
      (
          <aggregation function>(<column being aggregated>)
      FOR
      [<column that contains the values that will become column headers>]
          IN ( [first pivoted column], [second pivoted column],
          ... [last pivoted column])
      ) AS <alias for the pivot table>
      <optional ORDER BY clause>;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              monty Michael Widenius
              Votes:
              9 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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