Home » Interview Q&A » SQL Query to get desire output-4

SQL Query to get desire output-4

pivot and unpivot in sql server
The remote server returned an unexpected response: (413) Request Entity Too Large.

SQL Query to get desire output-4

Lets say we have tow tables named with Employee and Department shown as below:

SQL Query to get desire output-4 Tables

SQL Query to get desire output-4 Tables

Now if we want Total salary and Average salary of Department wise shown as below:

SQL Query to get desire output-4-query-1

SQL Query to get desire output-4-query-1

For that we have to write query as below:

 

About

Hello friends, My self Dhruv Sheth, I have more than 6 years of Industrial experience as a Software Developer. In my career I got chance to work with asp.net, c#,Web API, JavaScript, JQuery, WPF, WCF , Windows Application, PostScript, vb.net, GhostScript etc. So I have decided to share my knowledge with everyone and finally I have come up with TechnoThirsty.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload CAPTCHA.




DISCLAIMER:
The content is copyrighted to technothirsty.com and may not be reproduced on other websites without permission from the owner.You may contact us using the information below.