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 |
Is it possible for a stored procedure to call itself or recursive stored procedure?
Table student containing 2 columns,Join date,Employee name. Under join date 4 rows r ter =1-jan-2008,2-feb-2008,3-mar- 2008,4-feb-2008.Under Employee name 4 difeerent names jaison,robin,binoy,rahul Result set is, Table containing 4-column name=jan,feb,mar,april,,beneath these months count is given as 1,2,1,0 means these counts representing number of emplooyees joined in a month(january 1employee,february 2 employee,march 1 employee,april 0 employee) Can you give me the required sql query
What is microsoft sql server?
Why I can not enter 0.001 second in date and time literals in ms sql server?
what is the sql equivaent of the dataset relation object ?
What is the purpose of object explorer and its features? : sql server management studio
What factors you will consider calculating the storage requirement for that view?
Explain how to maintain a fill factor in existing indexes?
What do we have to check in database testing?
how to copy only distinct data into another table which is not already exist in database?
What is the diffrence between update_one and auto_fix?
How to find the list of fixed hard drive and free space on server?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)