Top "Pivot" questions

The PIVOT syntax converts row data into columnar data, and vice versa for the UNPIVOT syntax.

How to pivot in SQLite or i.e. select in wide format a table stored in long format?

I'd like to get a table which stores students data in long format and the marks they receive for all …

sql sqlite pivot
How to pivot text columns in SQL Server?

I have a table like this in my database (SQL Server 2008) ID Type Desc -------------------------------- C-0 Assets No damage C-0 …

sql sql-server-2008 pivot
SQL - How to transpose?

I have something similar to the following table: ================================================ | Id | UserId | FieldName | FieldValue | =====+========+===============+================| | 1 | 100 | Username | John Doe | |----+--------+---------------+----------------| | 2 | 100 | Password | …

sql mysql database pivot
Using pivot table with column and row totals in sql server 2008

I have a table with following columns defect_id, developer_name, status, summary, root_cause, Secondary_RC, description, Comments, environment_…

sql sql-server-2008 pivot
Retrieve ADO Recordset Field names (Classic ASP)

I wonder if someone can help: Long story short, I'm using MSSQL2005 to build a Pivot table. The data being …

asp-classic ado pivot recordset
Transpose column to row with Spark

I'm trying to transpose some columns of my table to row. I'm using Python and Spark 1.5.0. Here is my initial …

python apache-spark pivot transpose
Oracle Pivot query gives columns with quotes around the column names. What?

I'm trying to use PIVOT in Oracle and I'm getting a weird result. It's probably just an option I need …

sql oracle pivot
Setting column values as column names in the SQL query result

I wanted to read a table which has values which will be the column names of the sql query result. …

mysql sql pivot
Convert Access TRANSFORM/PIVOT query to SQL Server

TRANSFORM Avg(CASE WHEN [temp].[sumUnits] > 0 THEN [temp].[SumAvgRent] / [temp].[sumUnits] ELSE 0 END) AS Expr1 SELECT [temp].[Description] FROM […

sql sql-server tsql ms-access pivot
Dynamic alternative to pivot with CASE and GROUP BY

I have a table that looks like this: id feh bar 1 10 A 2 20 A 3 3 B 4 4 B 5 5 C 6 6 D 7 7 D 8 8 D And …

sql postgresql pivot crosstab window-functions