SQL Query - Convert data from Rows to Columns | Pivot

preview_player
Показать описание
This video is part of the series on scenario based SQL Query interview questions.

This discusses how to use a SQL Query to convert data from rows to columns using the SQL - PIVOT function.

Below is the Part 1 of this video which discusses how to use the CASE statement to achieve the same objective.

SQL Query to dynamically pivot the rows into columns | Dynamic Pivot

Must Do Data Analytics Certifications -

Google Data Analytics Professional Certificate

Google Advanced Data Analytics Professional Certificate

Practice SQL Queries on Your Browser through Interactive Courses -

Please do not forget to like, subscribe and share.

For enrolling and enquiries, please contact us at
Рекомендации по теме
Комментарии
Автор

Register at the below link to get US $100 off for Coursera Plus membership between Sep 8 - Sep 29, 2022.
The Coursera Plus membership gets you access to unlimited courses and unlimited certifications!

LearnatKnowstar
Автор

Went over many googled articles and they were filled with jargons and did not make any sense to me. After all that, I came across your clip and its solved all the mystery. Thanks for making it so simple to understand!

hmukai
Автор

You can avoid hardcoding the pivot column names by using dynamic pivot.
Here is the video tutorial link

LearnatKnowstar
Автор

Your voice is attractive day by day Teacher !!!
Great content as always

jacksparrowcapitan
Автор

Thank you for this. I learned about a much needed function in order for me to build a ssrs report.

sherrimcdonald
Автор

We have received your SQL Queries asked in interviews and plan videos soon answering those.


If you wish to share some more, put them down in the comments below or send us an email!


Happy Learning with Learn At Knowstar!

LearnatKnowstar
Автор

Learned a new SQL function today - interesting. Thanks.

kristyowens
Автор

Thank you ma'am it is very helpful this pivot function for my automations

RamPrasad-iokz
Автор

Thank you so much. This is what I am looking for

junevutran
Автор

It's not ideal that you have to know the values to use as pivot table columns. What if you wanted to base it off a sequential order? Like have the top value as the first column, the second value as the second column, etc. That way you could grab the top results and pivot them in order. I think this would be pretty easy to do in pandas.

bw
Автор

What does max function do here? Why was the aggregate needed?

shirishshukla
Автор

okay, tbh I think first method is easy to understand and use. but probably second one is common use. I just don''t like that pivot format

hulkbaiyo
Автор

Hi . This video is informative. However, I am looking for a pivot function when there are all String columns . What aggregate function can we use for String column?

sindhuratridandapani
Автор

Mam..Pls explain how to write the Pivot query if multiple records are present ...do we need to use partitions in the query ?

sweetysweetyvghb
Автор

hello mam, this is very helpful, however, was wondering if you have any video anywhere of yours on multiple pivot

karthikj
Автор

Hi great work ...!!
Can we have a entire course like video in converting the queries or stored procedures from oracle to ms sql

babun
Автор

How can i do that, when i want to show more than one row in that case? Example: I have a city name (collumn name) and in the rows i will put the name of the places. If i put MAX on the pivot, they show me only 1 row, but i need that they show me all the places... i need use another function, or pivot can attend me?

ThePHnunes
Автор

Wow. Didn't know about this function.

dimpyrathore
Автор

How to do this for both, and blank separator

ruchiagrawal
Автор

does this wroks in sql workbench ?i guess pivot dont work in tat

arunv