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

            monty Michael Widenius created issue -
            monty Michael Widenius made changes -
            Field Original Value New Value
            Epic Link MDEV-10137 [ 56868 ]
            monty Michael Widenius made changes -
            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
            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>;
            bar Alexander Barkov made changes -
            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>;
            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:

            {code:sql}
            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>;
            {code}
            alvinr Alvin Richards (Inactive) made changes -
            Labels Compatibility
            alvinr Alvin Richards (Inactive) made changes -
            Epic Link MDEV-10137 [ 56868 ] MDEV-10872 [ 58182 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.2 [ 14601 ]
            alvinr Alvin Richards (Inactive) made changes -
            Labels Compatibility Compatibility NRE-307517
            alvinr Alvin Richards (Inactive) made changes -
            NRE Projects NRE-307517
            alvinr Alvin Richards (Inactive) made changes -
            Labels Compatibility NRE-307517 Compatibility
            serg Sergei Golubchik made changes -
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            Juan Juan Telleria added a comment -

            Is it expected for MariaDB 10.3.6 RC?

            Thank you.

            Juan

            Juan Juan Telleria added a comment - Is it expected for MariaDB 10.3.6 RC? Thank you. Juan
            ralf.gebhardt Ralf Gebhardt made changes -
            Support case ID not-26307
            ralf.gebhardt Ralf Gebhardt made changes -
            NRE Projects AC-2610/DEFERRED
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 75814 ] MariaDB v4 [ 130486 ]
            Barumba Barney added a comment -

            Does this include support for UNPIVOT?

            The duplicate MDEV-12228 and the Microsoft link explicitly mention unpiviot, but the MariaDB link to to the CONNECT engine does not, and there is no syntax suggestion as there is for PIVOT.

            Would be good to clarify.

            Barumba Barney added a comment - Does this include support for UNPIVOT? The duplicate MDEV-12228 and the Microsoft link explicitly mention unpiviot, but the MariaDB link to to the CONNECT engine does not, and there is no syntax suggestion as there is for PIVOT. Would be good to clarify.
            tdig Tranner Dig added a comment -

            I would really appreciate this feature, I think it would be useful to many many people.

            Thanks,
            T.

            tdig Tranner Dig added a comment - I would really appreciate this feature, I think it would be useful to many many people. Thanks, T.
            pantonis antonis added a comment -

            In an analytics era this missing feature makes MariaDb a second class citizen

            pantonis antonis added a comment - In an analytics era this missing feature makes MariaDb a second class citizen

            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.