Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is unpivot?



What is unpivot?..

Answer / Chandrakant Bharti

UNPIVOT is a SQL operator used to transpose rows into columns. It allows you to convert rows with multiple columns into a single row with multiple identical column names, which can be useful for analyzing data from various dimensions. For example, the following query uses UNPIVOT to transform a table with two columns (Product and Q1-2020, Q2-2020) containing sales data for each quarter:nn SELECT * FROM SalesDatan UNPIVOT(n SalesAmount FOR Quarter IN (Q1-2020 AS Q1,n Q2-2020 AS Q2)n )

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Can a rule be bound to any column of any data type?

1 Answers  


Explain the concept of recursive stored procedure.

1 Answers  


What is a virtual table in sql?

1 Answers  


What is Trigger?

3 Answers   Misys,


What is inline variable assignment?

1 Answers  


Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the number of sales for each product

2 Answers  


Simple example for difference between select and cursor in sql

1 Answers  


Diffrence between DTS vs SSIS

2 Answers   IBM, Infosys,


What are the parts of a function?

1 Answers  


What is candidate key with example?

1 Answers  


When is the use of update_statistics command?

1 Answers  


What is open database communication (odbc)?

1 Answers  


Categories