SQL Tutorial - PIVOT

SQL Tutorial - PIVOT

BeardedDev

6 лет назад

120,653 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Lan W
Lan W - 06.05.2022 09:27

Thanks a lot for explaining this so clearly! This is really helpful!!

Ответить
rachael peters
rachael peters - 06.09.2023 20:58

this is the first video that worked for me, thank you!!

Ответить
Ebere Oyekwe
Ebere Oyekwe - 16.08.2023 15:51

Great stuff!

Ответить
Darryl Wilson
Darryl Wilson - 01.05.2023 00:45

What I can understand is where are you getting [Month] from?

Ответить
Maurice Mosseri
Maurice Mosseri - 21.04.2023 23:56

Great video. Very helpful. what if you dont have elements names, can it be dynamic?

Ответить
OZ
OZ - 01.04.2023 02:58

Hello. I'm watching this playlist because I've watched every single minute of the window functions, which I've loved so much. One question: do we have to hardcode the names of the new columns in the <columns> part as well as after the IN? I find it quite inefficient and clunky. No way to make it code dependent? I can imagine that we can use a SELECT statement after the IN, but what about the <columns> section? Thanks!

Ответить
Bulgarian83
Bulgarian83 - 18.01.2023 18:10

Much apreciated for this tutorial. It was very helpful.

Ответить
Kay K
Kay K - 26.12.2022 20:30

There should be a Heart react button for this video.
Thank you. ❤️

Ответить
راجح العمري
راجح العمري - 05.12.2022 20:20

thank you very much

Ответить
PopCap Music
PopCap Music - 25.10.2022 05:24

Hi I need help 😥I want to display the average in 2 decomal places but Idk how

SELECT Student, [English], [Mathematics], [Science], [Programming], [History]
FROM ( SELECT Student, Grades, Subject
FROM Grade_Report) AS SourceTable
PIVOT
(
AVG (Grades)
FOR
Subject IN ([English], [Mathematics], [Science], [Programming], [History])
) AS PivotTable

Ответить
Allayor Nasriddinov
Allayor Nasriddinov - 12.10.2022 09:06

how to summarize monthly data in annual level

Ответить
Huy Huy
Huy Huy - 14.09.2022 05:28

can u show me,
how to sum by column =>> total of sum(1),sum(2),sum(3),....

Ответить
Olga
Olga - 20.07.2022 01:30

Absolutelly love your accent! Thank's for video

Ответить
Nikhil Kulkarni
Nikhil Kulkarni - 01.07.2022 11:29

can u please tell how can we add a row/ column total to the pivot table

Ответить
alno1
alno1 - 28.05.2022 18:21

Very well explained!

Ответить
Mai Hương Bùi
Mai Hương Bùi - 11.05.2022 18:14

thanks teacher

Ответить
Caribou Data Science
Caribou Data Science - 31.03.2022 20:50

What is wrong with my pivot?

SELECT [United States],
[Asia],
[Canada]
FROM
(
SELECT
(SELECT country FROM regions r WHERE r.region_id = e.region_id) as [country]
FROM employees e
) AS Src
PIVOT
(
COUNT(country)
FOR country IN ([Asia],[Canada],[United States])

) AS Pivot

Ответить
Wolfram Foxhole
Wolfram Foxhole - 07.03.2022 01:25

Thank you!

Ответить
Caribou Data Science
Caribou Data Science - 11.01.2022 21:55

Thanks so much. This is very helpfull.

Ответить
mohamedAmine rg
mohamedAmine rg - 01.01.2022 19:23

that was very helpfull thankyou broo

Ответить