Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Solving SQL Query | Rows to Column in SQL
Play lesson

Learn Complete SQL (Beginner to Advance) - Solving SQL Query | Rows to Column in SQL

5.0 (3)
21 learners

What you'll learn

This course includes

  • 11.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

In this video, we will solve an SQL Query where we will need to transform data from rows to column. We can transform data from rows to column in SQL using PIVOT operator but not all RDBMS supports PIVOT. Microsoft SQL Server and Oracle supports PIVOT operator, whereas in PostgreSQL, we can transform rows to column using CROSSTAB function. Similarly in MySQL database, rows to column transformation can be done using the CASE statement. If you’d like to practice SQL queries or explore my recorded SQL courses, check out my all-in-one SQL learning platform, SQLNest 👇 https://sqlnest.com/ Hence in this video, we shall first look at the SQL query problem statement. We understand the input data and also understand the expected output. After this we shall write SQL query to solve this problem using PIVOT in Microsoft SQL Server and in Oracle. We shall then solve the same problem in PostgreSQL database using CROSSTAB function. Finally we shall also solve this query in MySQL database using the CASE statement. All the datasets, scripts and SQL queries used in this video can be downloaded from my blog and from my discord channel. Links below: Blog: https://techtfq.com/video/solving-sql-query-rows-to-column-in-sql Discord: https://discord.gg/8aRSbygbdu If you would like to share any interesting SQL query with me so that I can make a video about it then do share them in the email below: Email id: [email protected] Timestamp: 00:00 Intro 01:58 Understanding the SQL Query Problem statement 04:20 Solving SQL Query in Microsoft SQL Server using PIVOT 26:59 Solving SQL Query in Oracle using PIVOT 32:46 Solving SQL Query in PostgreSQL using CROSSTAB 55:31 Solving SQL Query in MySQL using CASE statement 🔴 WATCH MORE VIDEOS HERE 👇 ✅ SQL Tutorial - Basic concepts: https://www.youtube.com/playlist?list=PLavw5C92dz9HQQ_COgGb7kf_1H8UWUBxO ✅ SQL Tutorial - Intermediate concepts: https://www.youtube.com/playlist?list=PLavw5C92dz9FD9XspliRM_HZM_jK7tkii ✅ SQL Tutorial - Advance concepts: https://www.youtube.com/playlist?list=PLavw5C92dz9GbmgiW4TWVnxhjMFOIf0Q7 ✅ Practice Solving Basic SQL Queries: https://www.youtube.com/playlist?list=PLavw5C92dz9F66P3GFo5O6nJ4DfZNhVsp ✅ Practice Solving Intermediate SQL Queries: https://www.youtube.com/playlist?list=PLavw5C92dz9EIYmNXJ8ZtQ1bmLIpt0SpV ✅ Practice Solving Complex SQL Queries: https://www.youtube.com/playlist?list=PLavw5C92dz9Fahr7taauUx5RnTfuGyL-- ✅ Data Analytics Career guidance: https://www.youtube.com/playlist?list=PLavw5C92dz9FDsr995DjwCy9XNaIukb8P ✅ SQL Course, SQL Training Platform Recommendations: https://www.youtube.com/playlist?list=PLavw5C92dz9GqF1Q_zn8KnYvFgtEOh-2n ✅ Python Tutorial: https://www.youtube.com/playlist?list=PLavw5C92dz9FePZXIo4jpsupqp3X0w2SW THANK YOU, Thoufiq

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere