SQL INTERVIEW QUESTION | Advanced aggregation using CUBE
Вставка
- Опубліковано 20 жов 2024
- DML Script: datasculptor.b...
Feedback: forms.gle/NQuC...
The Data Sculptor UA-cam channel is a dedicated platform that explores the art and science of working with data. This channel caters to a diverse audience, including data enthusiasts, analysts, scientists, and anyone interested in harnessing the power of data for insightful and creative purposes.
The channel covers a wide range of topics related to data manipulation, analysis, visualization, and interpretation. The term "Data Sculptor" emphasizes the creative aspect of working with data, suggesting that it's not just about raw numbers but also about crafting meaningful stories and insights from the information available.
Viewers can expect a variety of content, including tutorials on popular data analysis tools and programming languages, discussions on emerging trends in the data field, case studies showcasing innovative data applications, and tips for effective data communication. The Data Sculptor aims to demystify complex concepts, making data-related skills accessible to both beginners and experienced professionals.
Whether you're a student looking to enter the field of data science, a business professional seeking to enhance your analytical skills, or simply someone curious about the world of data, the Data Sculptor UA-cam channel strives to provide engaging and informative content to help you navigate the exciting realm of data exploration and analysis.
Playlists:
SQL Interview Questions: • SQL Interview questions
Recursive CTE: • Recursive CTE
Power BI and DAX: • Power BI and DAX
Data Modeling: • Data Modelling
Generative AIs: • Generative AIs
Excel: • Excel
Follow me
Linkedin: / data-sculptor-93a00b2a8
Instagram: / datasculptor2895
Interesting
WITH CTE AS(SELECT NULL AS Product,REGION,SUM(sales) AS SALES
FROM SALES
group by 2)
SELECT C1.Product,NULL AS REGION,SUM(C1.SALES) AS SALES
FROM CTE AS C1
JOIN CTE AS C2 ON
C1.REGION C2.REGION
group by 1
UNION
SELECT * FROM CTE
UNION
select * from sales
UNION
SELECT Product,NULL AS REGION,SUM(SALES) AS SALES
from sales
group by 1
ORDER BY 1;