
Step 1:
In this tutorial I will show how to convert Rows to columns using Pivot. First open SQL server management studio. Then create table name as customer. This table contain to column. Now write some SQL commend to filter and show the data by using Pivot. Given bellow the SQL commend:
Step 2:
Select * from(SELECT LEFT(DATENAME(MONTH,[Created]),3) AS [MonthName]
FROM [dob].[Customer]) as S
PIVOT
(
COUNT([MonthName])
FOR[MonthName] IN(jan,feb,mar,apr,may,jun,aug,sep,oct,dec)
) AS PVT
Step 3:
Now exsiccate the query.