Top "Unpivot" questions

UNPIVOT describes a Query Language feature of some Relational Databases.

SQL Server : Columns to Rows

Looking for elegant (or any) solution to convert columns to rows. Here is an example: I have a table with …

sql sql-server tsql unpivot
Unpivot with column name

I have a table StudentMarks with columns Name, Maths, Science, English. Data is like Name, Maths, Science, English Tilak, 90, 40, 60 Raj, 30, 20, 10 …

sql sql-server sql-server-2008 tsql unpivot
SQL Server Pivot Table with multiple column aggregates

I've got a table: create table mytransactions(country varchar(30), totalcount int, numericmonth int, chardate char(20), totalamount money) The table has …

sql-server sql-server-2005 pivot unpivot
Convert matrix to 3-column table ('reverse pivot', 'unpivot', 'flatten', 'normalize')

I need to convert the Excel matrix FIRST in the table LATER: FIRST: P1 P2 P3 P4 F1 X F2 …

excel matrix pivot-table unpivot powerquery
SQL Server unpivot multiple columns

I'm trying to pivot a table around it's many columns to get to 3 columns (pivot, column name, value) so for …

sql sql-server unpivot
Select values from multiple columns into single column

I have a table in a database that has 9 columns containing the same sort of data, these values are allowed …

sql sql-server sql-server-2008-r2 unpivot
Mysql Convert Column to row (Pivot table )

I have a table like this +---+-----+----+----+----+----+ |id |month|col1|col2|col3|col4| +---+-----+…

mysql sql pivot unpivot
SQL transpose full table

I need to do the following transpose in MS SQL from: Day A B --------- Mon 1 2 Tue 3 4 Wed 5 6 Thu 7 8 Fri 9 0 …

sql sql-server pivot unpivot
Is it possible to have multiple pivots using the same pivot column using SQL Server

I am facing the following challenge. I need to rotate table data twice over the same column. Here's a screenshot …

sql sql-server pivot unpivot
Oracle 11g: Unpivot multiple columns and include column name

I'm triyng to unpivot multiple columns in my dataset. Here's what my data look like. CREATE TABLE T5 (idnum NUMBER,…

sql oracle oracle11g unpivot