No video

Practice Writing SQL Queries using Real Dataset(Practice Complex SQL Queries)

  Рет қаралды 237,755

techTFQ

techTFQ

Күн бұрын

Пікірлер: 374
@StefanoVerugi
@StefanoVerugi 2 жыл бұрын
I'm a beginner and found these videos amazing. Everything is just what you need, no frills, no lengthy talking, right to the point, If I can follow, everybody can. Real examples of how to solve queries, proper use of screen space, with a strong support from his blog where you can delve into more if still hungry of it. All for free, I so much appreciate this work, first class.
@techTFQ
@techTFQ 2 жыл бұрын
This feedback made my day.. thank you Stefano 🙏🏼 Your feedback is so precise that I feel I am able to deliver what I wished to deliver.. Thanks again and I am so happy you are able to follow this video 🙏🏼☺️
@rahulganga3274
@rahulganga3274 Жыл бұрын
You are beginner and you need short and real examples >> How examples in shorts ? Don't Lecture If you Don't Have Common sense.. He is doing Perfect..
@IndianHacker-hisBest
@IndianHacker-hisBest 11 ай бұрын
You are awesome Taufiq bro @@techTFQ
@sudhap1555
@sudhap1555 2 жыл бұрын
Thank You so much techTFQ. Your videos are sooo soo good. After learning window function by myself, the concept wasnt clear for me. It was after watching your video on window function I got a idea of how it works. Last month I had interview and questions were from SQL only. They asked different queries based on window functions and joins. The result came within a week and I am joining the company as Research Executive.
@techTFQ
@techTFQ 2 жыл бұрын
Amazing to hear this Sudha 👌 Thank you for sharing your success story.. I am really happy to have contributed to your learning .. Wishing you all the very best with your new job 💐
@manojpatil2457
@manojpatil2457 2 жыл бұрын
Kudos
@deepakts8941
@deepakts8941 2 жыл бұрын
Sir I saw all the sql videos it was really helpful. You are one of the best faculty and make concepts understand so easily.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you so much Deepak 🙏🏼 Am so glad you have liked my videos 🙂 And thank you for taking time to leave your feedback 🙏🏼
@nareshsachin7967
@nareshsachin7967 Жыл бұрын
I have to mention the mistake from your blog. You gave a solution query In your official blog. Problem NO. 10 you write a query for fetch all female count and male count with out removing duplicate records. So it return more number of users rather then the actual user count. Please verify all queries once. Your tutorial is very helpful thank you lot.❤
@enriquembomio3686
@enriquembomio3686 2 жыл бұрын
You made my day and that of many others’ learning SQL by sharing this amazing video! Please keep posting such valuable materials 👍
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Enrique 🙏🏼 Am so glad to hear you benefited from this video 🙂
@laurak5196
@laurak5196 2 жыл бұрын
TFQ, it’s like you were reading my mind! This is exactly where I’ve been stuck, not only finding reliable datasets that are interesting, but not knowing how to properly load them into Postgres so I can play. I really want to thank you so much for your time and efforts. I’ve only seen your intro, but you can bet I’ll be returning to see how you’re importing this dataset and connecting it to Postgres. It seems like that would be an easy thing to do, but I’ve tried and it isn’t. You will be helping so many people with this video. And your explanations are better than most instructors I’ve seen. You have many talents, but you’re an excellent teacher. Thank you again, so glad I found you here on KZfaq! 🙏🏻😀
@techTFQ
@techTFQ 2 жыл бұрын
Hi Laura , Thank you for such an amazing feedback🙏🏼 Taking your time to appreciate my work, I feel so happy to read each n every word you said. Am so glad you have liked my content and I am able to help you with your learning ☺️.. Thanks again 🙏🏼
@laurak5196
@laurak5196 2 жыл бұрын
@@techTFQ If I am able to make a career change as I hope to, it will be in no small part due to your efforts. I’m very grateful for your expertise and your ability to explain tricky concepts and break them down easily for us. Not everyone can do this; you have a gift 🙏🏻!
@laurak5196
@laurak5196 2 жыл бұрын
@@techTFQ PS I’m also going to try and solve all of your questions and I’ll be visiting your blog for more on that. Hopefully I won’t need any of your hints but still being new to SQL, I’m not so sure on this. All the time and effort you put into this is really appreciated. I hope next year at this time you have over 100K subscribers because you deserve it!
@techTFQ
@techTFQ 2 жыл бұрын
That’s a very big complement Laura .. You’ve made my day by such kind words.. I truly wish you get your dream job .. thank you once again 🙏🏼
@techTFQ
@techTFQ 2 жыл бұрын
Wowww amazing.. 100k would be great.. I’ll remember this comment if that happens by next year 😃 And yes try out solving all the queries .. after that hopefully you can come up with some queries of your own.. good luck 👍
@kswinny365
@kswinny365 4 ай бұрын
I cannot overstate how helpful this was. I was at my wit's end trying to figure out how to resolve the rogue ' without editing the source file. Thank you!
@ckarkhan
@ckarkhan 6 ай бұрын
Thoufiq, I've been writing SQL for many years now but watching these and other videos by you takes me to a different level. What I've learned is to break the problem into smaller parts and solve them individually. Also, there is a huge boost in my confidence in SQL interviews and the elevated quality of my code is noticed by the interviewers. All this is thanks to you. If I may request something, please make some videos on use of the QUALIFY clause in window functions. Also a video on the use of CUBE and ROLLUP features would be awesome! Is that asking for too much? Now, although I can read up on all these topics, if I watch your video, I will be able to internalize it even better. You are the best. Keep it up!
@bharathkumar.m9542
@bharathkumar.m9542 2 жыл бұрын
You're the best man..main part is you explain how to write queries by dividing the question and even the format part you follow..excellent quality. Thanks for guiding so many of us through your valuable content ❤️🙏..it would be great if you do more videos of query optimization and tuning in stored procedures your way of teaching would make it simple to understand them.
@PiyushBhisekar
@PiyushBhisekar Жыл бұрын
How do you explain everything so effortlessly! Best SQL resource on the internet!
@swatisinha3230
@swatisinha3230 2 жыл бұрын
It feels like whatever I am looking for now a days I can find it here. Thankyou so much for this video 🙏🏻
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome Swati 🙏🏼
@iitian2012
@iitian2012 2 жыл бұрын
Your sql query brings lots of clarification to the approach of solving. It would e of great help if you could take a step more further considering the real time scenarios where we have large number of tables inter related and we have to write queries out of those table. The main issue we face in such cases is the approach to join the certain set of tables and in using the window functions as well.If you can guide for such cases.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Aditya 🙏🏼 Prior to this video, I had already posted another video where I covered solving complex SQL queries where I used window functions and JOINS.. perhaps you can check that video out.. link below: kzfaq.info/get/bejne/fLSJl6V93MCak3k.html
@sachinjagtap3220
@sachinjagtap3220 Жыл бұрын
Your videos are actually giving me practical training on sql , very well explained with logics and prgani
@jeevankumarthadikonda7151
@jeevankumarthadikonda7151 Жыл бұрын
The last query explanation was just mind-blowing the best part of your explanation is dividing the problem into small parts and solving it step by step
@aapbeete9761
@aapbeete9761 Жыл бұрын
You made the first query very complicated. The simple solution is as follows: SELECT Sport FROM olympics_history GROUP BY Sport HAVING COUNT(DISTINCT Year) = (SELECT COUNT(DISTINCT Year) FROM olympics_history where Season='Summer');
@gilbertpradier
@gilbertpradier 11 ай бұрын
Simple and elegant
@vishalsonawane.8905
@vishalsonawane.8905 2 жыл бұрын
Hello God Gifted sir👑, I think you is one of the KZfaqrs for best content to teaching SQL Your video is really amazing and we alll students shares your all videos to our college and teachers also refer your video.... Please keep it up sir and make more videos for related SQL.... please please ..
@tushardaund3836
@tushardaund3836 Жыл бұрын
You are such an inspiration . the way you are helping me understand clearly what want is just amazing. Your efforts are seen and appreciated as well. i tried to solve question no 5 in my way please look once with cte as ( select games , noc from OLYMPICS_HISTORY group by games ,noc ) select noc ,count( noc) from cte group by noc having count(noc)=(select count( distinct games) from OLYMPICS_HISTORY ); ;
@sheebaparveen3630
@sheebaparveen3630 2 жыл бұрын
You are such an inspiration and my role model . the way you are helping everyone understand clearly what they want is just amazing. Your efforts are seen and appreciated as well. Seriously so so so proud ❤️
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Cheeb for the support always :) Happy to receive your feedback 😍
@fudgiplantaud2108
@fudgiplantaud2108 Жыл бұрын
@@techTFQ how did you find the script to run on the database
@shaikusman536
@shaikusman536 2 жыл бұрын
WOW...(7,611) views, (402) likes 0 (Dislike) achived in 16 days (28-10-21 to 13-11-21); thats Awsome appreciation for your knowledge and skills brother.....Thanks a ton....
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Shaik :) I dint realize this like and dislike count until i saw this comment :) Glad this video is liked by so many.
@agrim8863
@agrim8863 2 жыл бұрын
Thoufiq first of all the video is very insightful, and meticulous I reallly learnt a lot of new concepts hands down your tutorials on SQL are one of the I have ever come across. Please upload more such videos in future as well.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Agrim :) I am glad to know you have benefited from these videos :)
@minalgupta7456
@minalgupta7456 2 жыл бұрын
yur are the best teacher of sql, I am a big fan of u
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Minal :)
@hieutruong1769
@hieutruong1769 2 жыл бұрын
I have learned so much from your series. Thank you so much sir !!
@techTFQ
@techTFQ 2 жыл бұрын
Thank you :) So glad to hear this..
@AhmerJamil
@AhmerJamil 2 жыл бұрын
You are doing Amazing job, keep on doing the good work!!
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Jamil 🙏🏼 Glad you liked it..
@abdulsamadibrahim4929
@abdulsamadibrahim4929 2 жыл бұрын
Thank you so much TFQ! This goes a long way for me! Always learning new strategies to tackle SQL queries.👍🏻
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Ibrahim 🙏
@karennguyen7083
@karennguyen7083 2 жыл бұрын
I learned a lot from your SQL videos, please upload more videos about SQL and Python in the future. Thank you so much.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you, will do!
@fathimafarahna2633
@fathimafarahna2633 2 жыл бұрын
Proud of you mate...God bless all your efforts and time to give out authentic and precise content👌🏻👌🏻👌🏻🙏
@techTFQ
@techTFQ 2 жыл бұрын
Thank you 😘
@murchhanabanerjee862
@murchhanabanerjee862 6 ай бұрын
@ Taufiq sir where is your vlog link ? Can't find it
@VsK3Bal
@VsK3Bal Жыл бұрын
Your are the best! Thanks a lot for this class, now I know all the data sources and how to practice!
@girijashamak9142
@girijashamak9142 2 жыл бұрын
Just came back to your channel. Very happy to see you with many more subscribers. More wishes young man. God bless 🙏
@techTFQ
@techTFQ 2 жыл бұрын
Thank you so much Girija :)
@sandeepbhonsle8118
@sandeepbhonsle8118 Жыл бұрын
This has actually helped me a lot in understanding the SQL Thanks and keep posting such videos.
@shobhareddy4159
@shobhareddy4159 2 жыл бұрын
Yours are the best videos that I have ever found on you tube …. Keep going Toufiq
@techTFQ
@techTFQ 2 жыл бұрын
Glad you like them Shobha!
@zeeshanahmed2594
@zeeshanahmed2594 Жыл бұрын
Thank you very much Sir, for this tutorial. Got more clearity and new perspectives to approach a problem.
@manishgaurav84
@manishgaurav84 2 жыл бұрын
Very nice set of questions. Query 3, at 26:12, If in interviews it is not allowed to use pivot functions then we can do it using CASE WHEN with medals as (select nr.region as country, (case when medal = 'Gold' then 1 else 0 end) as Gold, (case when medal = 'Silver' then 1 else 0 end) as Silver, (case when medal = 'Bronze' then 1 else 0 end) as Bronze from olympics_history oh join olympics_history_noc_regions nr on nr.noc = oh.noc where medal 'NA') select country, sum(medals.Gold) as gold, sum(medals.Silver) as silver, sum(medals.Bronze) as bronze from medals group by country order by gold desc, silver desc, bronze desc;
@manvendraprasad1848
@manvendraprasad1848 Жыл бұрын
thanks, Manish i found this easy
@rushikesh3363
@rushikesh3363 7 ай бұрын
You are right i think also check my answer plz with cta1 as (select country, count(*) as Gold from OLYMPICS_HISTORY oh join OLYMPICS_HISTORY_NOC_REGIONS nr on oh.noc=nr.noc WHERE medal='Gold' GROUP BY country) with cta2 as (select country, count(*) as Silver from OLYMPICS_HISTORY oh join OLYMPICS_HISTORY_NOC_REGIONS nr on oh.noc=nr.noc WHERE medal='Silver' GROUP BY country) with cta3 as (select country, count(*) as Bronze from OLYMPICS_HISTORY oh join OLYMPICS_HISTORY_NOC_REGIONS nr on oh.noc=nr.noc WHERE medal='Bronze' GROUP BY country) select country,gold,silver,bronze from cta1,cta2,cta3 where cta1.country=cta2.country and cta2.country=cta3.country;
@rushikesh3363
@rushikesh3363 7 ай бұрын
also select nr.region as country, sum(case when medal = 'Gold' then 1 else 0 end) as Gold, sum(case when medal = 'Silver' then 1 else 0 end) as Silver, sum(case when medal = 'Bronze' then 1 else 0 end) as Bronze from olympics_history oh join olympics_history_noc_regions nr on nr.noc = oh.noc where medal 'NA'
@SSRKFJ
@SSRKFJ 2 жыл бұрын
Amazing...thanks a lot for sharing knowledge.. It means so much for learners lik me... Pls continue and post more content about sql for data analyst
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Jayanth 🙏🏼 Glad to see your comment ☺️
@amitshrestha1456
@amitshrestha1456 2 жыл бұрын
Thank you so much. It's entertaining to watch and learn. This is the training video I've been looking for. I'm currently working with Oracle SQL Developer and can only insert partial data. It would be more fun if I could insert the entire data set.
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome Amit 🙏🏼 I am glad you liked it.. Do you get any error when importing all the data ?
@amitshrestha1456
@amitshrestha1456 2 жыл бұрын
​@@techTFQ Thank you for responding. I fixed it. I accidentally checked the limit box, which is why only partial data were inserted. Importing a dataset was a lot easier than I expected on SQL developers. There's no need to write the entire Create statement. Thank you for the video once more. Continue making videos and motivating us. Happy New Year!
@techTFQ
@techTFQ 2 жыл бұрын
Great to hear Amit 👌 Thank you and happy new year to you too 🎊🎉
@robertgatterai7269
@robertgatterai7269 2 жыл бұрын
Man! I’ve been looking for something like this, thanks man
@techTFQ
@techTFQ 2 жыл бұрын
No problem buddy! glad this helped
@msateeshkumar6902
@msateeshkumar6902 2 жыл бұрын
You are like god ( teacher ) for me .🙏
@pragyan11114
@pragyan11114 2 жыл бұрын
great work .It is really very much helpful for beginners. Please do more videos for us.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you and will do
@poojamahesh8594
@poojamahesh8594 2 жыл бұрын
really sir, u are doing a great job..please keep helping us!!!! really very very usefull
@techTFQ
@techTFQ 2 жыл бұрын
Thank you :) Glad you liked it Pooja
@lucianlackman8103
@lucianlackman8103 Жыл бұрын
This is the kind of video been looking for ages
@spbspb2413
@spbspb2413 Жыл бұрын
It indeed became quite complex by the end, but also very simple at the same time thanks to your reasoning
@tamilanveeran4864
@tamilanveeran4864 2 жыл бұрын
Today subscribed your channel and really amazing explanation , I would recommend this video to my friends , thanks toufiq
@techTFQ
@techTFQ 2 жыл бұрын
Awesome buddy, glad you liked it
@alex45688
@alex45688 Жыл бұрын
God bless you brother, really loved your content so clear to the point, I am beginner concepts are getting clear , if you add more videos will learn and to become mastery in it
@preyashthakur71
@preyashthakur71 Жыл бұрын
Hello sir, I have learned sql recently but didn't how to apply this skill and practice of the project , but your videos helped me to understand more about SQL and about the work of data analyst. I have a question ,can we show this project in LinkedIn ? if yes then how?
@moulyanerella
@moulyanerella 6 ай бұрын
I want to solve some queries in SQL but I don't find anywhere correctly.Thanks for the video by letting this know.
@rishigupta2342
@rishigupta2342 2 жыл бұрын
Thanks!!! Make more video like this for sql practice.Also could you make a EDA video for python? You explain things very nicely.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Rishi 🙏🏼 Yeah for EDA , I will plan to do it..
@amanahmed6057
@amanahmed6057 2 жыл бұрын
Sir plz make a full-fledge course of 5-6 hours just like freecodecamp videos on SQL queries which covers from basic beginners to Advance Love from 21 yrs old boy congrats in Advance for 100k subs
@techTFQ
@techTFQ 2 жыл бұрын
Haha thanks Aman ☺️☺️ 100k is far away but thanks for the wishes 🤩 As for one long video, never thought about it but I’ll start considering it now
@technicalraman8848
@technicalraman8848 Жыл бұрын
Sir Salute. Plz plz make case study on sql by taking different datasets and also do data cleaning using sql and use advanced sq; queries. Plz sir
@ATTI0822
@ATTI0822 2 жыл бұрын
Amazing video! I'm a frontend guy, watching your videos help me widen my skills in an excellent way. Thanks! I have a question regarding the performance. I don't know too much about the performance of the partition by statement. In the last task, the partition by was used several times in the concat fns (5-6 times). What do you think regarding the performance in a production ready environment? Would it scale well by the time if total number of records grow?
@techTFQ
@techTFQ 2 жыл бұрын
Hi, thank you 🙏🏼 Glad you find these videos useful.. As for performance, window functions are pretty good even if we use partition by.. they should not cause any performance bottlenecks but then it also depends on how you write your sql query. As for my query in this video, we had around 270k+ records and still the queries with multiple partition by hardly took a few milliseconds to run.. Even with much more data I believe this won’t cause any performance issues but again it all depends on how you write your sql queries and how you create indexes on your tables and few other factors like table statistics etc.
@ATTI0822
@ATTI0822 2 жыл бұрын
@@techTFQ thanks for the detailed answer 👍
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome bro 🙏🏼
@mrrk6960
@mrrk6960 7 ай бұрын
Hello sir, I am your big fan, and your videos helps me alot, For that Jazakallahu Khaira, Sir in your blog there's a slight problem, the expected output you showed is wrong somewhere I think, some of that I noticed and you can check the 18th problems expected output. Thankyou sir
@ohme_ohmaya_
@ohme_ohmaya_ 2 жыл бұрын
Hi I've been watching your videos for a while and i love them. They're very helpful! But I wanted to let you know that I think there may be somehing wrong with your crosstab function (or maybe it's not reading the data correctly). For example, your response to question 18 shows that Paraguay has 17 bronze medals. They actually have 17 silver medals. I think the function my be classifying data into the wrong columns. I found that simply pivoting the medal data from rows to columns in MySQL did the trick! Just wanted to let you know. Have a great day!
@techTFQ
@techTFQ 2 жыл бұрын
Hi Maya , Thank you for liking my contents 🙏🏼 And thanks for highlighting this difference.. I am actually surprised,, I had tested it for a few countries data.. let me check this out tomorrow and correct it if needed.. Thanks again 🙏🏼
@ohme_ohmaya_
@ohme_ohmaya_ 2 жыл бұрын
@@techTFQ no problem!! You’ve helped me so much in developing my SQL skills. I really love and appreciate your videos! If you could do more of these types of videos where you display advanced SQL techniques using data on kaggle, that would be awesome. Thanks again and have a great day!
@techTFQ
@techTFQ 2 жыл бұрын
Am glad to hear this Maya.. Yes I plan to cover more such videos in the near future.. Have a good day to you too..🙂🙏🏼
@tonydominic-ll4wi
@tonydominic-ll4wi Жыл бұрын
Bro your channel is Amazing I am officially a fan now 😀😀😀
@Ganeshay-996
@Ganeshay-996 2 жыл бұрын
awesome👍👏👍👍👍👍👍👍👍👍👍👍
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Ganesh :)
@shivsharma9153
@shivsharma9153 2 жыл бұрын
thats what i call quality content
@techTFQ
@techTFQ 2 жыл бұрын
Thanks Shiv 🙏🏼
@shafi123
@shafi123 2 жыл бұрын
Thank you so much Thoufiq. I learnt a lot from your channel
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome Shaik 🙏🏼 Glad you liked it..
@mdnazmulahasanmirdha8142
@mdnazmulahasanmirdha8142 3 ай бұрын
we need more video sir love from 🇲🇾
@user-xp3xd6pt3l
@user-xp3xd6pt3l Жыл бұрын
subscribed to your channel, please give us more real-world SQL projects
@amolberad4875
@amolberad4875 2 жыл бұрын
Great and Thanks!!! Make more video like this for sql practice.
@techTFQ
@techTFQ 2 жыл бұрын
Glad you liked it and sure will do
@gianglearning3509
@gianglearning3509 2 жыл бұрын
Thanks. Hope you can release more videos like this in the future ^^
@techTFQ
@techTFQ 2 жыл бұрын
I plan to Giang
@realmusic9624
@realmusic9624 2 жыл бұрын
Your explanation is awasome AND plz make video on Root cause ANALYSIS
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Mushtak 🙏🏼
@manishgaurav84
@manishgaurav84 2 жыл бұрын
Similarly for Query 4, at 40:17, with medals as (select oh.games as games, nr.region as country, (case when medal = 'Gold' then 1 else 0 end) as Gold, (case when medal = 'Silver' then 1 else 0 end) as Silver, (case when medal = 'Bronze' then 1 else 0 end) as Bronze from olympics_history oh join olympics_history_noc_regions nr on nr.noc = oh.noc where medal 'NA'), county_wise as (select games, country, sum(medals.Gold) as gold, sum(medals.Silver) as silver, sum(medals.Bronze) as bronze from medals group by games, country order by games, gold desc, silver desc, bronze desc) select distinct(games), concat(first_value(country) over(partition by games order by gold desc), ' - ', first_value(gold) over(partition by games order by gold desc)) as Max_gold, concat(first_value(country) over(partition by games order by silver desc), ' - ', first_value(silver) over(partition by games order by silver desc)) as Max_silver, concat(first_value(country) over(partition by games order by bronze desc), ' - ', first_value(bronze) over(partition by games order by bronze desc)) as Max_bronze from county_wise order by games;
@subhabratanath2075
@subhabratanath2075 2 жыл бұрын
Hi brother your tutorials are the best.. can you please make a course alongwith problems so we can learn in-depth?
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Subhabrata 🙏 and I will make a complete SQL tutorial in a couple of months time.
@karthickraja1026
@karthickraja1026 Жыл бұрын
Trust me guys, this series have worth more than 'n'thousand price for those who want master in sql. -Thankyou so much for your effort @techTFQ💯
@anirvansen5024
@anirvansen5024 2 жыл бұрын
Thank you so much for these question sets , I have just completed these questions sets , What do you recommend which type of questions should we do now ?
@apamwamba
@apamwamba 3 ай бұрын
Looks like 51 unique olympics games are in the database but 52 olympic games by location are listed because the 1956 were held in two cities.The 1956 Summer Olympics, officially known as the Games of the XVI Olympiad, were an international multi-sport event held in Melbourne, Victoria, Australia, from 22 November to 8 December 1956, with the exception of the equestrian events, which were held in Stockholm, Sweden, in June 1956.
@apamwamba
@apamwamba 3 ай бұрын
So you really need to undetstand the data as rightly advised!!
@ShubhashreeMunot
@ShubhashreeMunot Жыл бұрын
Hii Taufiq, Big fan, learner and admirer of your work here!! I'm one of the most benefitted person from your videos. I just wanted to inform, in query 12, as you have taken 'group by name and team' and because data is not so clean ...hence it has missed the name of athlete 'Birgit Fischer-Schmidt' from Germany who is among top 5 athletes by total number of medels won. her team is shown as 'Germay' as some places and 'East Germany ' at some places. you could have get even accurate results by grouping on id and name.
@pveeranjireddy8959
@pveeranjireddy8959 2 жыл бұрын
Thank you... thank you....for sharing and posting.to world
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome bro 🙏🏼 Glad this helped
@suchitaachari6615
@suchitaachari6615 2 жыл бұрын
Thank you so much for this. I just have 1 doubt. In the question number 3, Can't we just use below query directly instead of with clause? Please do clarify my doubt. Select game,count(n.region) from history h join noc n on h.noc=n.noc group by game
@techTFQ
@techTFQ 2 жыл бұрын
You cannot because the output is wrong.. because history table has data for each athlete so there would be multiple athletes from each country corresponding to each olympic games so the counts would be way to more.. For example, in 1896 games, 12 countries participated but from your query you would get 380 (which is the total athletes and not country)
@suchitaachari6615
@suchitaachari6615 2 жыл бұрын
@@techTFQ Ahh Okay. Got it. Thank you 👏
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome 🙏🏼
@test-hj9lx
@test-hj9lx 2 жыл бұрын
Very nice practicing videos
@techTFQ
@techTFQ 2 жыл бұрын
Thank you 🙏🏼
@1281dee
@1281dee 2 жыл бұрын
Amazing video, Thank you. I started my learning journey with MySQL can I still use these codes on MySQL? Also can you share some projects for MySQL that I can practice with?
@Mysingh9767
@Mysingh9767 2 жыл бұрын
Thanks for such a great videos....
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome Dhananjai :) glad this helped..
@dimuthuathapaththu5406
@dimuthuathapaththu5406 Жыл бұрын
Really appreciate your work. ❤❤❤
@jonathanbuenyen4679
@jonathanbuenyen4679 2 жыл бұрын
Thank you sir. How do I load this same datasets on mysql? Could you help ?
@hassy9118
@hassy9118 2 жыл бұрын
Simply awesome!
@techTFQ
@techTFQ 2 жыл бұрын
Thank you so much :)
@pydjango9812
@pydjango9812 2 жыл бұрын
Great video sir
@techTFQ
@techTFQ 2 жыл бұрын
Thank you 🙏🏼
@tanmayvyavhare5863
@tanmayvyavhare5863 Жыл бұрын
Can't we use the below query for problem number 3 instead. Although I appreciate the efforts you take to explain every small detail, I feel this could have been simplified using the below query. Select nr.region, Sum(case when medal = 'Gold' then 1 else 0 end) g_count, Sum(case when medal = 'Silver' then 1 else 0 end)s_count, Sum(case when medal = 'Bronze' then 1 else 0 end)b_count From olympics_history oh join Olympics_history_noc_regions nr On oh.noc = nr.noc Group by nr.region;
@NirdeshM
@NirdeshM 2 жыл бұрын
thanks alot, very well explained
@techTFQ
@techTFQ 2 жыл бұрын
Glad it was helpful!
@TheDisciplinedPoser
@TheDisciplinedPoser 2 жыл бұрын
Hello, I'm a newly subscriber and I have been looking for channel like this for quite sometime. Thank you. For Query 2, I can just use limit 5 if ranking is not needed? select name, team, count(medal) as total_medals from olympics_history where medal = 'Gold' group by 1, 2 order by 3 desc limit 5
@techTFQ
@techTFQ 2 жыл бұрын
Thank you for liking my contents 🙏🏼 Limit 5 will just fetch the first 5 records but if you look at the data there can be multiple athletes who won 9 gold medals or 8 gold medals so you need to fetch all of them.. That is why ranking is required
@TheDisciplinedPoser
@TheDisciplinedPoser 2 жыл бұрын
@@techTFQ looking forward to seeing your solution to other queries
@honestreview6900
@honestreview6900 2 жыл бұрын
You are Great Dear
@techTFQ
@techTFQ 2 жыл бұрын
Thank you 🙏🏼 Glad you like the content 🙂
@Motivation_Station_Neo
@Motivation_Station_Neo 2 жыл бұрын
great explanation
@techTFQ
@techTFQ 2 жыл бұрын
Thank you 🙏🏼
@esperatbamgbose7569
@esperatbamgbose7569 8 ай бұрын
Thank you ,for this amazing tutorial
@techTFQ
@techTFQ 8 ай бұрын
Welcome:)
@theaj199021
@theaj199021 2 жыл бұрын
Great content !!!!
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Amit
@Jennyluuuu
@Jennyluuuu 2 ай бұрын
This project is incredible! I do have one question. I imported this dataset into mySQL and the data was not fully imported no matter how many times I tried. There were supposed to be 271k+ rows of data but I only got 270k something, which changed up the accuracy of my query results a little bit. Do you know how to fix this?
@analystgabriel
@analystgabriel 2 жыл бұрын
Great video
@techTFQ
@techTFQ 2 жыл бұрын
thank you Gabriel :)
@gabrielfinco8768
@gabrielfinco8768 2 жыл бұрын
Hi Very good tutorial abd very helpfull,i got a question, in a team sport like football how can we count the correct way since it counts by athlete, i mean 2016 Brasil won 1 Gold medal instead of 22 for football
@techTFQ
@techTFQ 2 жыл бұрын
Hi Gabriel, Thanks for liking the video 🙏🏼 I think, I already had a query for this exact question and the solution was to do the count by taking the DISTINCT Team value.. 22 players but the team is just 1 so when I do a distinct I get just 1 and not 22
@prash516
@prash516 2 жыл бұрын
Hi Taufiq...first of all, gratitude for the things I am learning with your great videos. Reg this activity, can you please help on what to do with the "Table_Structures.ddl" file? can we create a table directly with it rather than writing the "create table" query? Also could not find the query file for creating the table on your blog.
@techTFQ
@techTFQ 2 жыл бұрын
Thank you Prashanth 🙏🏼 Table_Structure.ddl is the file which has the create table scripts.. Just open this file in any editor and then copy paste the contents of this file into PG Admin to create the tables
@prash516
@prash516 2 жыл бұрын
@@techTFQ Got it. Thanks a lot for the kind reply. Hope to keep learning as much :)
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome Prashant 🙏🏼
@mbhazimangoveni3068
@mbhazimangoveni3068 Жыл бұрын
Man! I love your work
@daltonjaklitsch7304
@daltonjaklitsch7304 2 жыл бұрын
On mysql workbench the csv file is taking such a long time to import .. the file is only 40mb so I don't understand why... any thoughts? I manually created a table and matched all the columns but it has been 30 minutes and I have 1k out of 130k rows
@dovlapav1614
@dovlapav1614 Жыл бұрын
Same, probably it’s not compatible with MySQL😢
@ShivaniSingh-xj1ot
@ShivaniSingh-xj1ot 10 ай бұрын
Hi I tried running the third query but the results were different even after I tried using ur solution. this was the question: 3. Mention the total no of nations who participated in each olympics game?
@kanelanecaiphus5951
@kanelanecaiphus5951 Жыл бұрын
Earned my subscription 😎
@ELB_MohdShajar
@ELB_MohdShajar Жыл бұрын
Q6 query: select Sport, count(distinct(Games)) as count from athletes where season = 'summer' group by Sport having count= (select count(distinct(Games)) as count from athletes where season = 'summer')
@seifedd8841
@seifedd8841 Жыл бұрын
Your superstar man ! thank you
@haribalaji4136
@haribalaji4136 Жыл бұрын
Hi TFQ, I have solved the question no 3, with flag concept which you have taught in the `Practice SQL Interview Query | Big 4 Interview Question` YTvideo please let me know, I'm I right right or wrong? my query, with cte as (select *, (case when medal='Gold' then 1 else null end) as flag_gold, (case when medal='Silver' then 1 else null end) as flag_silver, (case when medal='Bronze' then 1 else null end) as flag_bronze from olympics_history), ct2 as (select cte.noc, count(flag_gold) as gold_medels, count(flag_silver) as silver_medals, count(flag_bronze) as bronz_medals from cte group by noc) select n.region, c.gold_medels, c.silver_medals, c.bronz_medals from ct2 c join olympics_history_noc_regions n on n.noc=c.noc order by gold_medels desc, silver_medals desc, bronz_medals desc; The problem is except the fist record, other record are mismatching with your result, pls let me know, whats the problem in my query. waiting for your reply.. my result "USA" 2638 1641 1358 "Russia" 1082 732 689 "Germany" 745 674 746 "UK" 678 739 651 "Italy" 575 531 531 "France" 501 610 666 "Sweden" 479 522 535 "Canada" 463 438 451 "Hungary" 432 332 371 "Germany" 397 327 281 "Russia" 390 367 408 "Norway" 378 361 294 "China" 350 347 292 "Australia" 348 455 517 "Netherlands" 287 340 413 "Japan" 247 309 357 "South Korea" 221 232 185 "Finland" 198 270 432 "Denmark" 179 241 177 "Switzerland" 175 248 268 "Cuba" 164 129 116 "Romania" 161 200 292 "Germany" 159 194 233 "India" 138 19 40 "Serbia" 130 167 93 "Russia" 127 71 81 "Poland" 117 195 253 "Spain" 110 243 136 "Brazil" 109 175 191 "Austria" 108 186 156 "Belgium" 98 197 173 "Argentina" 91 92 91 "New Zealand" 90 56 82 "Czech Republic" 81 225 182 "Greece" 62 109 84 "Croatia" 58 54 37 "Bulgaria" 54 144 144 "Ukraine" 47 52 100 "Pakistan" 42 45 34 "Czech Republic" 42 36 66 "Turkey" 40 27 28 "Jamaica" 38 75 44 "Kenya" 34 41 31 "South Africa" 32 47 52 "Uruguay" 31 2 30 "Mexico" 30 26 54 "Belarus" 24 44 71 "Nigeria" 23 30 46 "Ethiopia" 22 9 22 "Kazakhstan" 20 25 32 "Australia" 20 4 5 "Cameroon" 20 1 1 "Iran" 18 21 29 "Zimbabwe" 17 4 1 "North Korea" 16 16 35 "Serbia" 15 29 41 "Slovakia" 15 19 13 "Bahamas" 14 11 15 "Estonia" 13 12 25 "Fiji" 13 0 0 "Serbia" 12 26 26 "Indonesia" 11 17 13 "Uzbekistan" 10 7 17 "Ireland" 9 13 13 "Thailand" 9 8 13 "Slovenia" 8 13 27 "Georgia" 8 6 18 "Azerbaijan" 7 12 25 "Trinidad" 7 8 17 "Egypt" 7 8 12 "Lithuania" 6 7 48 "Morocco" 6 5 12 "Colombia" 5 9 14 "Algeria" 5 4 8 "Portugal" 4 11 26 "Luxembourg" 4 4 0 "Taiwan" 3 28 18 "Latvia" 3 19 13 "Chile" 3 9 20 "Tunisia" 3 3 7 "Dominican Republic" 3 2 2 "Mongolia" 2 10 14 "Armenia" 2 5 9 "Venezuela" 2 3 10 "Uganda" 2 3 2 "Liechtenstein" 2 2 5 "Peru" 1 14 0 "Vietnam" 1 3 0 "Puerto Rico" 1 2 6 "China" 1 2 1 "Israel" 1 1 7 "Haiti" 1 1 5 "Individual Olympic Athletes" 1 1 3 "Tajikistan" 1 1 2 "Costa Rica" 1 1 2 "Syria" 1 1 1 "Ivory Coast" 1 1 1 "Bahrain" 1 1 1 "Grenada" 1 1 0 "Ecuador" 1 1 0 "Burundi" 1 1 0 "Panama" 1 0 2 "United Arab Emirates" 1 0 1 "Suriname" 1 0 1 "Mozambique" 1 0 1 "Jordan" 1 0 0 "Nepal" 1 0 0 "Kosovo" 1 0 0 "Paraguay" 0 17 0 "Iceland" 0 15 2 "Montenegro" 0 14 0 "Malaysia" 0 11 5 "Namibia" 0 4 0 "Philippines" 0 3 7 "Moldova" 0 3 5 "Lebanon" 0 2 2 "Tanzania" 0 2 0 "Sri Lanka" 0 2 0 "Ghana" 0 1 22 "Czech Republic" 0 1 11 "Saudi Arabia" 0 1 5 "Qatar" 0 1 4 "Kyrgyzstan" 0 1 2 "Zambia" 0 1 1 "Niger" 0 1 1 "Syria" 0 1 1 "Sudan" 0 1 0 "Botswana" 0 1 0 "Virgin Islands, US" 0 1 0 "Tonga" 0 1 0 "Guatemala" 0 1 0 "Curacao" 0 1 0 "Cyprus" 0 1 0 "Senegal" 0 1 0 "Gabon" 0 1 0 "Trinidad" 0 0 5 "Afghanistan" 0 0 2 "Kuwait" 0 0 2 "Djibouti" 0 0 1 "Guyana" 0 0 1 "Mauritius" 0 0 1 "Bermuda" 0 0 1 "Macedonia" 0 0 1 "Barbados" 0 0 1 "Eritrea" 0 0 1 "Iraq" 0 0 1 "Togo" 0 0 1 "Monaco" 0 0 1 "Malawi" 0 0 0 "Nauru" 0 0 0 "Malaysia" 0 0 0 "Oman" 0 0 0 "Madagascar" 0 0 0 "Lesotho" 0 0 0 "Saint Lucia" 0 0 0 "Liberia" 0 0 0 "Libya" 0 0 0 "Palestine" 0 0 0 "Palau" 0 0 0 "Papua New Guinea" 0 0 0 "Laos" 0 0 0 "Kiribati" 0 0 0 "Virgin Islands, British" 0 0 0 "Honduras" 0 0 0 "Zimbabwe" 0 0 0 "NA" 0 0 0 "Guam" 0 0 0 "Guinea" 0 0 0 "Rwanda" 0 0 0 "Germany" 0 0 0 "Samoa" 0 0 0 "Equatorial Guinea" 0 0 0 "Guinea-Bissau" 0 0 0 "Seychelles" 0 0 0 "Saint Kitts" 0 0 0 "Sierra Leone" 0 0 0 "Gambia" 0 0 0 "San Marino" 0 0 0 "Solomon Islands" 0 0 0 "Somalia" 0 0 0 "Micronesia" 0 0 0 "El Salvador" 0 0 0 "South Sudan" 0 0 0 "Sao Tome and Principe" 0 0 0 "Dominica" 0 0 0 "Greece" 0 0 0 "Cape Verde" 0 0 0 "Swaziland" 0 0 0 "Comoros" 0 0 0 "Cook Islands" 0 0 0 "Democratic Republic of the Congo" 0 0 0 "Chad" 0 0 0 "Republic of Congo" 0 0 0 "Cayman Islands" 0 0 0 "Turkmenistan" 0 0 0 "Timor-Leste" 0 0 0 "Cambodia" 0 0 0 "Central African Republic" 0 0 0 "Burkina Faso" 0 0 0 "Brunei" 0 0 0 "NA" 0 0 0 "Boliva" 0 0 0 "Belize" 0 0 0 "Bosnia and Herzegovina" 0 0 0 "Bhutan" 0 0 0 "NA" 0 0 0 "Benin" 0 0 0 "Bangladesh" 0 0 0 "Vanuatu" 0 0 0 "American Samoa" 0 0 0 "Aruba" 0 0 0 "Saint Vincent" 0 0 0 "Vietnam" 0 0 0 "Antigua" 0 0 0 "Yemen" 0 0 0 "Yemen" 0 0 0 "Yemen" 0 0 0 "Angola" 0 0 0 "Andorra" 0 0 0 "Albania" 0 0 0 "Mauritania" 0 0 0 "Myanmar" 0 0 0 "Malta" 0 0 0 "Malaysia" 0 0 0 "Nicaragua" 0 0 0 "Mali" 0 0 0 "Canada" 0 0 0 "Marshall Islands" 0 0 0 "Maldives" 0 0 0
@indiafirst984
@indiafirst984 2 жыл бұрын
Thanks bhai..
@techTFQ
@techTFQ 2 жыл бұрын
Your welcome bro
@tableauexpert7287
@tableauexpert7287 Жыл бұрын
One question is that Can we make pivot dynamic? If new medal i.e platinum is added then what will be query for that to make it dynamic?
@abdulsamadibrahim4929
@abdulsamadibrahim4929 2 жыл бұрын
Hi TFQ, please, how can one import .csv file to PostgreSQL automatically, most especially when one has a large dataset to work with. It's been giving me problem lately. Thanks a lot.
@minalgupta7456
@minalgupta7456 2 жыл бұрын
pls upload more videos related to sql
@techTFQ
@techTFQ 2 жыл бұрын
noted, will do
@mayankbhardwaj1487
@mayankbhardwaj1487 2 жыл бұрын
I am doing the same in MySQL but importing the csv to the table is taking too long
@techTFQ
@techTFQ 2 жыл бұрын
Is it.. I tried the same in oracle using SQL Developer tool and it was significantly slower compared to PostgreSQL.. Looks like importing csv file is the fastest in PostgreSQL
@divyasathish8853
@divyasathish8853 4 ай бұрын
Thank you sir
@mahmoudsadiek9691
@mahmoudsadiek9691 Жыл бұрын
1st query select count(distinct games) as co , sport from events where events.Season = 'summer' group by sport order by co
@mahmoudsadiek9691
@mahmoudsadiek9691 Жыл бұрын
2nd query select top 5 count(medal) as "count medal" , name from events where events.medal ='gold' group by name order by "count medal" desc
@ManishKumarJha-uz9dl
@ManishKumarJha-uz9dl Жыл бұрын
Dear TechTFQ, I really liked your videos and I learnt a lot from you, but I'm stuck with PIVOT function in MS sql server "Write SQL query to display the total gold, silver and bronze medal won by each country in Olympics." can you help me with this.
Complete guide to Database Normalization in SQL
40:51
techTFQ
Рет қаралды 164 М.
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
SPONGEBOB POWER-UPS IN BRAWL STARS!!!
08:35
Brawl Stars
Рет қаралды 23 МЛН
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 2,1 МЛН
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 145 М.
Solving SQL Interview Queries | Tricky SQL Interview Queries
37:22
Starting a Career in Data Science (10 Thing I Wish I Knew…)
10:42
Sundas Khalid
Рет қаралды 184 М.
How I Would Learn to be a Data Analyst
12:30
Luke Barousse
Рет қаралды 1,5 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН