Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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
- duplicates
-
MDEV-12228 SUGGESTION: TRANSACT-SQL LIKE "PIVOT" AND "UNPIVOT"
- Closed