- Видео 9
- Просмотров 831
Don Data
Добавлен 18 май 2024
Welcome to SQL Mastery! 🚀 Your ultimate destination for mastering SQL, one query at a time.
Are you a beginner looking to get started with SQL? Or an experienced developer aiming to sharpen your skills? You've come to the right place! My channel provides easy-to-follow tutorials, comprehensive guides, and practical tips to help you understand and apply SQL in real-world scenarios.
What I Offer:
Step-by-Step Tutorials: Learn SQL fundamentals with simple, clear instructions.
Advanced Techniques: Dive deeper with complex queries, joins, and optimization strategies.
Practical Examples: Follow along with real-world examples and sample databases to solidify your understanding.
Cheat Sheets & Resources: Get access to valuable resources, including cheat sheets and sample queries on GitHub.
Connect with Me:
Website: www.dondata.ai
Subscribe now and take the first step towards becoming an SQL master! 🔔
Are you a beginner looking to get started with SQL? Or an experienced developer aiming to sharpen your skills? You've come to the right place! My channel provides easy-to-follow tutorials, comprehensive guides, and practical tips to help you understand and apply SQL in real-world scenarios.
What I Offer:
Step-by-Step Tutorials: Learn SQL fundamentals with simple, clear instructions.
Advanced Techniques: Dive deeper with complex queries, joins, and optimization strategies.
Practical Examples: Follow along with real-world examples and sample databases to solidify your understanding.
Cheat Sheets & Resources: Get access to valuable resources, including cheat sheets and sample queries on GitHub.
Connect with Me:
Website: www.dondata.ai
Subscribe now and take the first step towards becoming an SQL master! 🔔
SQL Window Functions: The Ultimate Guide
Unlock the power of SQL window functions! In this tutorial, you'll learn how to go beyond basic aggregations and take your SQL skills to the next level. Discover how to calculate running totals, percentages of totals, and advanced analytics like rankings and row numbers-all while keeping your original dataset intact. Perfect for data analysts and anyone looking to perform deeper analysis with SQL! 🚀
What You'll Learn:
✅ How window functions differ from GROUP BY
✅ Using SUM, AVG, and other aggregations with OVER
✅ Running totals and partitioning by columns
✅ Analytical functions like LEAD, LAG, RANK, and DENSE_RANK
Got questions? Drop them in the comments-I'm here to help!
Interested in a free SQ...
What You'll Learn:
✅ How window functions differ from GROUP BY
✅ Using SUM, AVG, and other aggregations with OVER
✅ Running totals and partitioning by columns
✅ Analytical functions like LEAD, LAG, RANK, and DENSE_RANK
Got questions? Drop them in the comments-I'm here to help!
Interested in a free SQ...
Просмотров: 61
Видео
SQL JOINs - from Zero to Many-to-Many JOINs!
Просмотров 29828 дней назад
In this video, we’ll dive deep into SQL joins, equipping you with essential skills to navigate and manipulate databases effectively. Whether you're looking to enhance your data analytics skills or kickstart a career in data science, understanding SQL joins is crucial. Be sure to download my free SQL cheat sheet at dondata.ai/sqlcheatsheet to complement your learning! We will cover all the main ...
How to LEFT JOIN in SQL Without Duplicates
Просмотров 56Месяц назад
See why left joins can create duplicate rows in your base table. Two easy methods to avoid those duplicates: Aggregating results and using DISTINCT. Do you have problems remembering the JOIN syntax: Grab your free SQL Cheat Sheet at www.dondata.ai/sqlcheatsheet now. Are you frustrated with getting more rows than expected after performing a left join in SQL? In this video, I'll show you exactly ...
STOP Wasting Time on SQL Analysis Here's the 10-Minute Fix!
Просмотров 232Месяц назад
Download your SQL Cheat Sheet at www.dondata.ai/sqlcheatsheet In this tutorial, you'll learn how to write powerful SQL queries using a small, easy-to-follow dataset of just 5 rows. Perfect for beginners, this video will help you grasp key concepts like: - Selecting specific columns and data - Filtering data based on conditions (e.g., salary ranges, name patterns) - Grouping data for better insi...
SQL for Football Fans: GROUP BY Explained
Просмотров 234 месяца назад
In this video, I'll show you the GROUP BY functionality using an exciting real-world dataset - football stats from the Bundesliga 2015/2016 season. Learn how to analyze player pass completion ratios and filter out insignificant data points with the HAVING clause. 🔗 Source Data: Explore the dataset used in this tutorial - StatsBomb Open Data: github.com/statsbomb/open-data 📄 Free SQL Cheat Sheet...
T-SQL Aggregation Functions: Explained & Demonstrated
Просмотров 365 месяцев назад
Learn all about T-SQL aggregate functions like SUM, AVG, MIN, MAX, and COUNT in this expert guide. Master these functions to level up your T-SQL skills! Additionally, we will look at the often overlooked COUNT(DISTINCT) to remove duplicates from the counts. 📘 Topics Covered: - How to use the SUM function in T-SQL - Calculating average values with AVG - Finding minimum and maximum values with MI...
WHERE CLAUSE - Master T-SQL Filtering Like a Pro
Просмотров 275 месяцев назад
📊 Unlock the power of T-SQL with our comprehensive guide on mastering the WHERE clause! This video will teach you the essential concepts and techniques for filtering data in T-SQL, enabling you to efficiently retrieve the information you need from your database. 📋 In this video, you'll learn: - How to use the WHERE clause to filter data based on specific conditions. - Techniques for comparing v...
Simple T-SQL Queries for Beginners: SELECT, ORDER BY, CASE WHEN + [Free SQL Cheat Sheet]
Просмотров 635 месяцев назад
Welcome to my beginner's guide on T-SQL queries! 🎓 In this video, I'll walk you through some fundamental T-SQL commands: SELECT, ORDER BY, TOP, DISTINCT, and CASE WHEN. Whether you're new to T-SQL or looking to brush up on your skills, this tutorial will help you master the basics with ease. 📋 What You'll Learn: SELECT: How to retrieve data from your database. ORDER BY: How to sort your query r...
T-SQL Tutorial: The Ultimate Guide for Beginners!
Просмотров 446 месяцев назад
Do you want to learn T-SQL fast? This T-SQL tutorial for beginners shows you how to: - SELECT columns FROM tables - Filter results with a WHERE clause - Join different tables using INNER JOINs - Aggregate data using GROUP BY - Sort results using ORDER BY The SQL tutorial uses the SQL Server Management Studio to query a local SQL Server. WideWorldImporters sample database: github.com/Microsoft/s...
Got this problems a lot. I think we need to understand how joins work. If the right or left table column joining key is not unique. We will have duplicate. Am I right ?
Hi @skateforlife3679, that is exactly the case, correct! The thing with join is, that we sometimes want the duplicate rows and sometimes not. But this behavior is not intuitive and we have to explicitly think about what is going on at the data level when our join criteria might not be unique. When we don't want the duplicates, we have to explicitly work our way around it (e.g. using DISTINCT, GROUP BY or String Aggregations). But, you explained it much shorter than me 😀... Have a nice day, Henning aka Don Data
Can i fetch tables as nested arrays directly or if i must do some loops and conditions in programming language
Hi @@عليالعصفوري-ط4ض , I am not 100% sure I understand your question correctly. You can definitely loop over tables, which would be the SQL equivalent to arrays from programming. Yiu could either use CURSORs to loop over tables, or WHILE loops which fetch one row per loop. Conditions can be set using IF... THEN.... ELSE.... END. In general, while possible, in SQL you try to avoid loops and rather use so called set operations, which perform query logic over the whole table at once instead of row by row logic for performance reasons. Does this answer your question? Best wishes, Henning aka Don Data
@Don_Data My question is in real world app Like social media app if iwhat to send data like posts: { Id:1, Content : content , User:{ Id:1, Name: jack } } For all posts table with each user I fetch all posts the loops by it and fetch every user where primary = forigen Or i can fetch left join like this structur in some how
Hi @عليالعصفوري-ط4ض, if I understand correctly, you have two tables, Posts and Users in a relational database and want to expose the data as .json? The part of generating the json structure aside, to fetch the data you could query: SELECT p.Id AS PostId, p.Content, u.Name AS UserName FROM Posts p INNER JOIN Users u ON u.Id = p.UserId But I am not 100% sure if I understood you correctly. Without know the data structure on the database side, it is difficult to tell. Hope this helps to point you in the right direction.
@@Don_Data yes you under stand correctly if the query as you writing it will fetch as array of mixed data or left join row But i want the user data to be in sub array called user What i did was left join then fetch first table from db then fecth second table from db Then for loop push first of users in first of posts [user] , second in second... etc. Can i have finall result directly from data db without loop
Hi @عليالعصفوري-ط4ض, yes, you can create JSON string from SQL queries in most database engine. I have create a browser executable query. You can open it via the following link using T-SQL (e.g. Microsoft SQL Server). sqlfiddle.com/sql-server/online-compiler?id=542776f0-ff9f-42fa-8bbe-5e55304a092f If the link does not work, here is the code: SELECT 'Post 1' AS Id, 'First post of User 1' AS Content, 'User 1' As Userid INTO #Posts UNION SELECT 'Post 2' AS Id, 'Second post of User 1' AS Content, 'User 1' As Userid UNION SELECT 'Post 3' AS Id, 'First post of User 2' AS Content, 'User 2' As Userid UNION SELECT 'Post 4' AS Id, 'Second post of User 2' AS Content, 'User 2' As Userid SELECT 'User 1' AS Id, 'First User Name' AS Name INTO #Users UNION SELECT 'User 2' AS Id, 'Second User Name' AS Name SELECT p.Id AS Postid, p.Content, u.Id AS UserId, u.Name FROM #Posts p INNER JOIN #Users u ON u.id = p.UserId FOR JSON AUTO; I hope this brings you on the right track and you can avoid the loops, Henning
Excellent work. The theory is very clear and accompanied with the practical part.
Very professional content🎉 super video quality!
Thank you for the clear and helpful explanation! Great job making the concept easy to understand. 😊
Hi friend, I hope this video helps you improve your understanding of SQL Joins. Do you have any questions?
Hi friend, did you ever encounter this problem? How do you solve it?
helpful video
Hi @vietphu2804, glad that this video is helpful for you!
Thank you for this video! I am just beginning my journey learning SQL, and I really enjoyed your simple and concise instruction. The company I worked for has been laying off large numbers of people for some time now, and the most recent department to be affected was the one I worked in. My last day of work was 06Sep. I have decided to pursue a career in Data Analytics as I think it is a much better fit for me than what I was doing before (corporate finance at a large CRO). I built several tools in MS Excel that were officially adopted by the department I worked in, so I am confident in Excel and enjoy working with it very much. My plan is to teach myself SQL and Tableau as well as improve my statistical math skills and gain a beginner-level proficiency in Python. I am not young, so I am quite concerned with my current employment status (especially with the current job market and the fact that I have two young sons (3 months and 3 years old)). Your approach to teaching is easy to consume and I think it will be very helpful for me. I am very happy that RUclips's algorithm put your video into my feed. I am currently in the middle of a 20+ hour video to learn Tableau and an 11-hour video for Python. The videos are quite good, and I am sure that I will gain a lot of value from them, but in just 10 minutes watching your video, I feel like I learned so much. Maybe even more important, it made me feel confident that I will be able to learn SQL without much trouble. Unfortunately, I cannot say that I feel the same way about Python, and I'm not even sure how I feel about Tableau yet even though it is supposed to be fairly simple to learn. I suppose it is all about finding the right teacher and format of material delivery. It looks like I found my SQL guy! 🙂
Hi Carlos, wow, thanks for sharing all this. I am still not 100% on top of the commenting functionality here so I did miss it. I am happy to read this and I am confident that you will make your transition to the data analytics space. You just made me smile. Making this RUclips channel sometimes feels like doing all the effort in vain. Thanks a lot! 😀
Hi friend, do you have any questions regarding the topics shown? Feel free to grab your copy of my SQL Cheat Sheet for free at www.dondata.ai/sqlcheatsheet
Cool video idea! Thanks for the clear explanation on the GROUP BY :)
Hi there, do you have any questions?
Hi there, did you like the video? Do you have any questions?
Welcome 👋, do you have any questions? I'd like to hear from you.
Hi there 👋, do you have any questions? I'd like to hear from you.