Top "Pivot" questions

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

SQL Server: how can I use COALESCE with a PIVOT table?

What I'm trying to do is provide a value if another value doesn't exists within my pivot table. Pivot table …

sql-server pivot coalesce
SUM of dynamic Columns in PIVOT table in SQL Server

I have a Dynamic PIVOT query in which Columns are dynamically generated. My table: ATTENDANCE_MASTER Contains: ID, Stud_id, …

sql-server pivot powerpivot pivotviewer activepivot
How can I "merge", "flatten" or "pivot" results from a query which returns multiple rows into a single result?

I have a simple query over a table, which returns results like the following: id id_type id_ref 2702 5 31 2702 16 14 2702 17 3 2702 40 1 2703 23 4 2703 23 5 2703 34 6 2704 1 14 And …

sql sybase pivot flatten
Laravel pivot: Get model from withPivot()

I'm building an application using Laravel 4 but have stumbled across a problem with the pivot tables. I've got a user …

laravel pivot eloquent
How do I hide a PivotItem?

I have a Page with an Pivot-control and in some cases I don't want to show a particular PivotItem. Setting …

xaml silverlight windows-phone-7 pivot
TSQL - Unpivot multiple columns

How can I unpivot multiple columns in "one"? Right now I have an unpivot for each column but this creates …

sql-server tsql pivot crosstab unpivot
Using PIVOT to Flip Data from Wide to Tall

I have a table that is rather wide that I would like to convert to tall. The data currently resides …

sql sql-server-2008 tsql pivot unpivot
Sql Server 2008 - PIVOT without Aggregation Function

I know you've got multiple topics touching on this. But, I havent found one that addressed my needs. I need …

sql sql-server-2008 pivot pivot-without-aggregate
Pivot multiple columns into rows in SQL Server?

I have a table with data like this create table temp ( colName varchar(50), name varchar(50), icon varchar(150), totalcount int ) insert …

sql-server pivot unpivot
How to pivot or crosstab in postgresql without writing a function?

I have a dataset that looks something like this: I'd like to aggregate all co values on one row, so …

postgresql pivot crosstab