SQL Querying for Beginners Tutorial

Поділитися
Вставка
  • Опубліковано 15 лип 2024
  • SQL Querying for Beginners Tutorial
    Get Ad-Free Training by becoming a member today!
    / @learnittraining
    Exercise Files: bit.ly/3n5sr0G
    SQL Express Download Link:
    www.microsoft.com/en-us/Downl...
    Northwindsql Link:
    raw.githubusercontent.com/mic...
    Northwind Alternate: bit.ly/3sIvodn
    If you are having issues with the Northwind DB pleases delete lines 24 and 25 and execute.
    Who it's for: This course has been designed for individuals who wish to learn how to use SQL to query databases and extract information.
    What it is: SQL stands for Structured Query Language. It’s a common language for gathering, organizing, and exporting data stored in relational databases.
    What you'll learn: In this course, you’ll learn basic SQL usage and terminology, as well as how to execute simple queries and queries using criteria conditions. Next, you’ll learn how to summarize, organize, and export valuable query data and results.
    Join Learnit Anytime for ad-free training, exams, certificates, and exclusive content:
    www.learnitanytime.com
    For Private Group Trainings please visit:
    www.learnit.com/private-group...
    Manuals: bit.ly/30xZb59
    Username: manuals
    Password: password
    Start 0:00
    Introduction 0:03
    Introduction to SQL 0:30
    Installing SQL Server 4:27
    SQL Keyword Command Language and Hierarchy 8:26
    Connecting to a SQL Database 13:35
    Creating and Saving a Query 22:44
    Using One or More Query Conditions 32:43
    Applying AND OR Operators 40:36
    NULL NOT NULL 46:48
    Range of Values 49:28
    Querying Data Using Wildcard Characters 58:04
    Formatting Column Headings with Aliases 1:04:48
    Formatting Query Data Results 1:10:06
    Performing Date Calculations - DateDifDateAdd 1:14:10
    Summarizing Data Using Aggregate Functions AVG COUNT SUM min max 1:22:39
    Manipulating Text Results with String Functions CONCAT_SUBSTR 1:30:26
    Sorting Data Order BY and GROUPBY 1:38:07
    RANK and HAVING 1:46:24
    Mathematical Financial Expressions 1:52:23
    PIVOT 1:58:24
    JOIN 2:07:27
    Union ALL 2:20:30
    Except Clause 2:26:30
    Sub Queries 2:28:25
    Exports 2:40:41
    Conclusion 2:44:04
    #SQL #Query
    (C) 2022 Learnit, Inc.
    Any illegal reproduction of this content will result in immediate legal action.

КОМЕНТАРІ • 245

  • @LearnitTraining
    @LearnitTraining  4 місяці тому +2

    To anyone unable to see the Northwind Database on the left side of the screen:
    (i) Rigth click on the folder "Databases" -> "New Database..."
    (ii) On "Database name" write Northwind and click OK
    (iii) Click "New Query", paste and execute the script
    Thanks lolo for the great tip!
    If you are having issues downloading the northwind file please use this online practice lab: www.sql-practice.com/

  • @sepegden
    @sepegden Рік тому +29

    This instructor is probably the best I've seen so far. This course was at the right pace, and the right subject matter and has been such a great help. Thanks so much

    • @LearnitTraining
      @LearnitTraining  Рік тому +2

      You're very welcome!

    • @kolvis78
      @kolvis78 Рік тому

      @@LearnitTraining Hi, you are wonderful teaching, I am having some trouble getting the Northwind.sql file. would you assist me on how to download it. Thank You

    • @idehaisamuel1320
      @idehaisamuel1320 Рік тому

      @@kolvis78 not only you self, me too

    • @niitnahuja8793
      @niitnahuja8793 11 місяців тому +1

      @@kolvis78 I was facing the same, in the end, I made a new database in Management studio. I did it using the right click in the database tree on the left column, named it "Northwind". Opened a query in the database and then pasted the syntax from the file in the description adn saved it. It worked.
      After it, I was able to perform all the queries as taught in the lesson.

  • @mortonwakeland3809
    @mortonwakeland3809 8 місяців тому +4

    OMG - perfect diction! Thank you Christina!! Some of the folks on here I cannot understand for they speak about 10,000 mph! Best and thank you for your time! Mort

  • @JamesNjanjo
    @JamesNjanjo 2 дні тому +1

    Very good tutorial, straightforward.....have learnt alot. Waiting patiently for the intermediate and advanced Sql tutorial from this Channel.🙏🙏👏👏

  • @lorik9940
    @lorik9940 8 днів тому +1

    Wow. What a great course! Good job😄 I learned the basics of sql in 3 days and ready to go. Thanks!!

  • @omkarchogale1445
    @omkarchogale1445 2 місяці тому +3

    Great instructor! Thank you so much for this course, Christina. Your guidance has been invaluable and truly appreciated

  • @searchformeaning85
    @searchformeaning85 11 місяців тому +7

    Excellent instructor. Crystal clear explanation! Please add SQL queries intermediate, advanced, expert and database design with her. Dan McAllister also was an amazing instructor. Keep up the good work.

  • @samnako
    @samnako Рік тому +8

    Guys, the instructor here is awesome. Her explanations on sql concepts are excellent. She made me develop a strong desire for sql. Its often been confusing all along in years past.
    For the first time i saw there is a fine line separating sql from php though they both go together in my choice of programming. For the first time i wrote sql statements and ran them on the phpmyadmin environment and also saw a button that can help me generate the php code of sql.
    Madam, i can't thank you enough. You are a 5 star GENERAL in the teaching of sql. You made it less frustrating and less intimidating. This is what a teacher looks like. Thank you again ma, i had to come back here after a week to give you this feedback, review and to subscribe to your channel. God bless you richly with more wisdom.

  • @kensimba7868
    @kensimba7868 2 роки тому +10

    We can't wait for more advanced tutorials by your state-of-the-art tutors like captain Dan McAllister ( the man with a gorgeously coarse voice),Sean Bugler (eloquent man), ma'am Chelsea Dohman (a sweetheart s voice), etc. They made me a programmer. God bless learnit

  • @dkorobchenko1
    @dkorobchenko1 2 роки тому +9

    Thank you very much for making this tutorial, it really helped me out!
    Many tutorials out there just can't compete with your level of quality.
    Can't wait for intermediate and advanced tutorials! I hope they will be in the foreseeable future :)

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Thank you for the kind words!

    • @idehaisamuel1320
      @idehaisamuel1320 Рік тому +1

      @@LearnitTraining please how can I get the northwind file please, because I can't see it sir.

  • @ThekisoPhume
    @ThekisoPhume Рік тому +4

    WOW What a best instructor! this is the most comprehensible SQL tutorial I have came across so far !✅✅✅

  • @wintermorillo6567
    @wintermorillo6567 Рік тому +2

    Very good video for a refresher! I was able to quickly pick up from where I left when I began learning SQL. Thank you for such a great content. You're awesome.

  • @lori3248
    @lori3248 2 роки тому +4

    You guys make such good courses. I could learn anything explained by you.

  • @1982epm
    @1982epm 2 роки тому +2

    Greattt,
    especially for me who is self-taught because I got a job as an IT Consultant DBA
    Now I have become proficient in MSSQL queries.
    But there are still some that I don't fully understand.
    This content has really helped me a lot.
    If I may request, I want to see the content of always on replication

    • @LearnitTraining
      @LearnitTraining  2 роки тому +1

      Hi Deny! We are producing a much more robust SQL Reporting Services video series coming soon!

  • @terrychen2662
    @terrychen2662 2 роки тому +6

    Very great SQL course and very specific. Thanks for sharing.

  • @soundofmusic0613
    @soundofmusic0613 2 роки тому +2

    Pretty neat, simple, and well-explained! Thanks for this tutorial! It helps me a lot!

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      You are very welcome! Thank you for watching!

    • @dexxxxxxxx
      @dexxxxxxxx 2 роки тому

      How to download data from github?

  • @user-zu3lf2qi3y
    @user-zu3lf2qi3y Рік тому +2

    Cant Wait for your full SQL course!!! so exited!!! 🤩🤩🤩

  • @vanillacreem816
    @vanillacreem816 Рік тому +4

    This is an incredible tutorial. I'm at the 1:57:00 mark and have already learned so much. Well done on teaching this!

    • @LearnitTraining
      @LearnitTraining  Рік тому

      Awesome, thank you!

    • @idehaisamuel1320
      @idehaisamuel1320 Рік тому

      @@LearnitTraining please sir, I can't see the northwind file please where can I get the file, sir.

  • @Ikilledthebanks
    @Ikilledthebanks Рік тому +3

    Incredibly well done, I wish you could zoom in a bit when working in the query editor but really great job. Thank you very much

  • @shnuiiwithdoublei
    @shnuiiwithdoublei Рік тому +1

    i love it! looking forward intermediate and advanced sessions as well. thankyou so much for the open upload of such quality content

  • @janikabourne7903
    @janikabourne7903 Рік тому +1

    I watched a full, 3 minutes long advertisement as a simple way to support this marvelous channel:-;

    • @LearnitTraining
      @LearnitTraining  Рік тому

      Thank you so much! Small things like that help us tremendously!

  • @box5329
    @box5329 Рік тому +2

    Very clear lecture and easy to follow, thank you ! 👍

  • @kebincui
    @kebincui 2 роки тому +5

    Excellent,although very basic. Looking forward to your intermediate and advanced level of sql server tutorial 👍👍

    • @LearnitTraining
      @LearnitTraining  2 роки тому +3

      Coming soon!

    • @kensimba7868
      @kensimba7868 2 роки тому +1

      Am waiting for these advanced SQL tutorials specifically by learnit because they have top-notch instructors, the likes of Chelsea Dohman, Captain Dan McAllister, Sean Bugler etc. I absolutely love their work

    • @ojiehkingsley918
      @ojiehkingsley918 Місяць тому

      @@LearnitTraining How soon? it's has been 2 years now.

  • @berziboy1090
    @berziboy1090 2 роки тому +2

    Great Video, easy to follow and clear to understand

  • @lolo-bd6kx
    @lolo-bd6kx 6 днів тому +2

    To anyone unable to see the Northwind Database on the left side of the screen:
    (i) Rigth click on the folder "Databases" -> "New Database..."
    (ii) On "Database name" write Northwind and click OK
    (iii) Click "New Query", paste and execute the script

  • @davidnana6568
    @davidnana6568 Рік тому +1

    Very insightful tutorial. Very helpful for me learning SQL on my own

  • @amos0140
    @amos0140 2 роки тому +2

    Thank you for providing an excellent tutorial, pitched at exactly the right level for me !
    I am now able to construct and execute my own enquiries at work without pestering the IT dept. every time

  • @kirawu4507
    @kirawu4507 2 роки тому +1

    Very helpful video! Thanks for all the hard work.

  • @hiscanopy9336
    @hiscanopy9336 2 роки тому +1

    Awesome Work, I have learnt alot from this. Thanks so much for the good work indeed.

  • @ryansarwar6814
    @ryansarwar6814 2 роки тому +1

    was really waiting for it.... thanks in advance learnit.

  • @user-il7kr3my6f
    @user-il7kr3my6f 5 місяців тому +1

    Thank you for uploading such a helpful video tutorial

  • @tommya1086
    @tommya1086 2 роки тому +6

    Great content :). Will we be getting a complete course with advanced and expert videos?

    • @LearnitTraining
      @LearnitTraining  2 роки тому +11

      Hi Tommy! This is just a single course for now. We are working on more SQL videos however!

  • @alexrosen8762
    @alexrosen8762 2 роки тому +2

    Super useful! Thanks 🙂

  • @dexxxxxxxx
    @dexxxxxxxx Рік тому +1

    Next level please 😀

  • @marinosanagnostou8116
    @marinosanagnostou8116 2 роки тому +1

    Very well explained video.
    Very good.
    Thank you.

  • @divyanshsingh2764
    @divyanshsingh2764 8 місяців тому +3

    After successfully executing the script as instructed at 21:00 . I am unable to see the database on the left hand side of the screen . Please suggest some solution for it.

  • @rofinejoy7455
    @rofinejoy7455 3 місяці тому

    👏👏👏👏👏👏👏 thanks for breaking it down.

  • @jeanpenus
    @jeanpenus 2 роки тому +1

    Fantastic tutorial

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Thank you for the kind words Jean Pierre Beuses!

  • @pinielchitare9221
    @pinielchitare9221 2 роки тому +2

    A great tutorial and a nice voice

  • @user-bv3cd9im5s
    @user-bv3cd9im5s 2 роки тому

    Thanks very much

  • @meowmeow6605
    @meowmeow6605 2 роки тому +1

    I can't wait for the Intermediate Tutorial video

  • @prathamgupta7605
    @prathamgupta7605 2 роки тому +1

    amazing video!!

  • @mytinystars
    @mytinystars Рік тому +1

    Amazing Explanation 👍👍

  • @michalrw5713
    @michalrw5713 4 місяці тому +1

    well done- VOICE of sql ;)
    pięknie podane, z jajem-tak to ujmę:)

  • @ntonyjaime_
    @ntonyjaime_ 6 місяців тому +1

    Hi,I just started working through the tutorial tips on the video. In the first part when you used northwind.sql,and said to close the sql management studio and connect back in. When i did that,I could not find on the left hand side (object Explorer).
    What can I do So I can follow along

  • @ahmadbeizaei6009
    @ahmadbeizaei6009 2 роки тому +1

    Thank you

  • @User-qw1ir
    @User-qw1ir Рік тому +3

    I cannot download Northwind. From the video description. How can i do it?

  • @yashshah6919
    @yashshah6919 2 роки тому +1

    Thank You Madam

  • @niitnahuja8793
    @niitnahuja8793 11 місяців тому +1

    I always follow learnit for everything I need to learn. Great resource. In this particular lesson, I wish either ranking was explained in more detail or should have been taken out all together. The explanantion was more counfusing.
    Still a great video to learn or even revise SQL. Covers all the topics beautifully.
    Thank you @LearnitTraining

  • @venkatkyasa
    @venkatkyasa 2 роки тому +1

    The content in course is very good. Are we getting complete course?

    • @LearnitTraining
      @LearnitTraining  2 роки тому +3

      Hi Kyasa! We actually combined the course into one, but we are working on more SQL videos coming soon!

  • @isamirzayev9905
    @isamirzayev9905 Рік тому +1

    thank you

  • @ingasiradeghyan5402
    @ingasiradeghyan5402 2 роки тому +1

    Great :)

  • @shaghdaei
    @shaghdaei 2 місяці тому +1

    thank you I could use that alternative website but I want to know why I couldn't add that database into my SQL SERVER?

    • @LearnitTraining
      @LearnitTraining  2 місяці тому +1

      We can't say for sure as we do not have any access to your SQL Server. We do try to provide as many options as possible for being able to access the Northwind Database.

  • @amosufit3174
    @amosufit3174 8 місяців тому

    Many thanks for the video. The training is superb but I have issues with loading the Northwind database, hence, couldn't follow along. Pls be kind to explain more on how to load the database to the server.

    • @LearnitTraining
      @LearnitTraining  8 місяців тому

      This article may help: learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases#get-the-northwind-sample-database-for-sql-server

  • @bambina5604
    @bambina5604 10 місяців тому +3

    Unable to create the database. The script execution is successful but there's no Northwind db after restarting.
    Edit: the script from GitHub even says "This script does not create a database.". The pubs script works, the Northwind one added tables to System Database.

    • @LearnitTraining
      @LearnitTraining  10 місяців тому

      This article may help: learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases

    • @rahilvaseer2809
      @rahilvaseer2809 10 місяців тому

      Hey, what was the name of the datebase that appeared in SSMS? Is it Northwind? The name im getting is "pubs"...

  • @jacobirish9826
    @jacobirish9826 2 роки тому +3

    Hello. Really excited for this tutorial. However, when I go to execute the DB from the files downloaded from github it is not working. The files I have downloaded and am trying to executre are named slightly different. "instnwnd (Azure SQL Database).sql" and "instnwnd.sql." When I open the later it looks identical to what you are showing in the recording, but still will not execute. Your help would be greatly appreciated.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Jacob! You can get your question answered at Offsite, our online community - www.offsitebylearnit.com

  • @SumiyaG
    @SumiyaG Рік тому

    Thank you, dear! Will you teach intermediate, advanced, and professional skills? I want to learn your lessons.

  • @rubenalcidesfigueroa1655
    @rubenalcidesfigueroa1655 11 місяців тому +1

    Awsome

  • @infini.tesimo
    @infini.tesimo 2 роки тому +2

    For some reason the database isn't creating like you said it would after logging out then back in. I even saved the file on my desktop. What am I doing wrong?

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi The Generational Wealth Guy! You can get help at Offsite, our online community - www.offsitebylearnit.com

  • @thanhphan2374
    @thanhphan2374 2 роки тому +1

    Thank you! I have a question though. If I want to use the database (excel or access files for example) containing information on my own business (for real life use), how can I import that data into SQL server?

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hello Thanh Phan! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com

  • @josueg8852
    @josueg8852 2 роки тому +2

    We need the intermediate and advanced version of sql server:)

    • @LearnitTraining
      @LearnitTraining  2 роки тому +5

      Hi Josue! Those videos are currently being produced! We will have 6 brand new videos on SQL Reporting Services soon!

  • @alulahabesha7207
    @alulahabesha7207 2 місяці тому

    Great

  • @franzkern4208
    @franzkern4208 2 роки тому +2

    Great Content.
    Thanks a lot.

  • @GozallHasan
    @GozallHasan 29 днів тому

    hi
    i finally found the most helpful course to learn from and i really want to practice it , but i got problem in downloading the Northwind sql databases i would love to complete practicing in this course may i have some help in how to effectively download this file???

    • @LearnitTraining
      @LearnitTraining  29 днів тому

      If you are having issues downloading the northwind file please use this online practice lab: www.sql-practice.com/

  • @cornucopiahouse4204
    @cornucopiahouse4204 Рік тому +1

    Can't create Northwind database. Code in GitHub seems broken.

  • @giulianociolacu4637
    @giulianociolacu4637 2 роки тому +2

    Hi, i can t file the file northwindsql in the provided link... can you please let me know where should i look?

    • @LearnitTraining
      @LearnitTraining  2 роки тому +1

      Northwindsql Download Link:
      github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs

  • @paduaronel
    @paduaronel 7 днів тому +1

    Good day. the northwind daabase didnt appear.
    all the tables will appear under the master database.
    can you help me to solve this.?
    thank you

    • @LearnitTraining
      @LearnitTraining  7 днів тому

      If you are having issues downloading the northwind file please use this online practice lab: www.sql-practice.com/

  • @shaghdaei
    @shaghdaei 2 місяці тому +1

    hi transfer northwind file and then execute it but the database won't be shown in the section of database, what should I do?

    • @LearnitTraining
      @LearnitTraining  2 місяці тому

      You can also practice using this site: www.sql-practice.com/

  • @SalvageRestorationAndTechTips
    @SalvageRestorationAndTechTips 2 роки тому +1

    is pivoting for beginners? :)

  • @mariham_ad1137
    @mariham_ad1137 4 місяці тому

    I did not see the northwind database after logging back in

  • @yeahnick4260
    @yeahnick4260 2 роки тому +1

    Can u teach us VBA in Access aswell? would be awesome too !

    • @LearnitTraining
      @LearnitTraining  2 роки тому +1

      Yeahnick! We will definitely look into getting that add to our video production list

    • @yeahnick4260
      @yeahnick4260 2 роки тому

      @@LearnitTraining awesome!

  • @shimamirlou4194
    @shimamirlou4194 2 роки тому +1

    hi I have a problem, after copy pasting the DB and execute them and logging out and opening the management studio, there is no saved northwindsql on the left side column so I can't continue practicing. would you please help me?

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Northwindsql Download Link:
      github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs

    • @cullie815
      @cullie815 2 роки тому +1

      @@LearnitTraining Hi I have the same problem after logging out and opening the management studio, there is no saved northwindsql on the left side column. What are we meant to do with the link you have provided above to fix this?

  • @aamirahmed9744
    @aamirahmed9744 2 роки тому +3

    Can I get a follow up to this Video..? Say the Intermediate and the Master and Expert level..... ..!!!

    • @LearnitTraining
      @LearnitTraining  2 роки тому +5

      Hi Aamir! We currently have a full scale SQL class being recorded. It will be a 5 video series. Coming soon!

  • @RealLamasyah
    @RealLamasyah 8 місяців тому +1

    Please where's the link to these class file described at 0:12 ?
    Please I need help to find them

    • @LearnitTraining
      @LearnitTraining  8 місяців тому

      Exercise Files: bit.ly/3n5sr0G
      SQL Express Download Link:
      www.microsoft.com/en-us/Download/details.aspx?id=101064
      Northwindsql Link:
      raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/databases/northwind-pubs/instnwnd.sql
      Northwind Alternate: bit.ly/3sIvodn

  • @nwadikej8989
    @nwadikej8989 Рік тому +1

    Experiencing challenges loading the Northwind scrift onto SSMS, its not creating the relevant tables thus preventing me from further progressing with the course. Kindly advice on how to remedy this.

    • @LearnitTraining
      @LearnitTraining  Рік тому

      Hello Nwadike! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com/

  • @pon00050
    @pon00050 Рік тому +1

    4/21/2023 ~4:30

  • @9to5Drone
    @9to5Drone 2 роки тому +2

    This may be a stupid question but how do I download the Northwind data?

    • @codyscorner1829
      @codyscorner1829 2 роки тому +1

      Well that Northwind DB is a 20 year old database. She should be using the new Adventure Works 2019 database.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi 9 to 5 Voyager! The link to the Northwind data is in the video description

  • @johnpopolizio9518
    @johnpopolizio9518 11 місяців тому

    seems interesting but I cant get the Northwind code off the site so I am at an early stop

  • @erajiemarvic6903
    @erajiemarvic6903 2 роки тому +1

    hello i have problem. how can i get the interval hours or total hours in single column Date(timestamp). because of mixing time-in and time-out in single column. also how can i get the first-in and last-out per day at per employeeID. Send me query please :(

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Erajie! You can get your question answered at Offsite, our online community - www.offsitebylearnit.com

  • @peacemind888
    @peacemind888 2 роки тому +1

    how do I download the Northwind data? There Is no Northwind SQL in the link now.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Peacemind888! The link to the Northwind data is in the video description

  • @KH-uz4hc
    @KH-uz4hc 2 роки тому +1

    How do I access the Northwind database script? I have followed the link with no success. I also can't see the responses to others who have asked about this. Thanks.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi K H! We just tested the link and the site is still working. Once you get to the page the links are instnwnd.sql, instpubs.sql, and readme.md Instructions on how to install them are lower on the page.

  • @abrilgonzalez7892
    @abrilgonzalez7892 7 місяців тому +1

    My Northwind file shows up as is an Microsoft Access File, doesn't do It as "Northwind.sql". ¿How can I fix that? Thanks you!

    • @LearnitTraining
      @LearnitTraining  7 місяців тому +1

      This article may help: learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases

  • @juantapia7832
    @juantapia7832 4 місяці тому

    Great job, thank you very much!
    I don´t understand the difference between JOIN (or inner join) with subqueries. Can you explain me, please?

    • @LearnitTraining
      @LearnitTraining  4 місяці тому +1

      Your personal and company data are protected in this chat
      Certainly! Let's delve into SQL subqueries and how to use them in conjunction with INNER JOINs.
      Subqueries (also known as nested queries) are queries embedded within other queries. They allow you to retrieve data from one table based on the results of another query. Subqueries can be used in various parts of a SQL statement, including the SELECT, FROM, WHERE, and HAVING clauses.
      INNER JOIN is used to combine rows from two or more tables based on a related column between them. It returns only the rows where there is a match in both tables.
      When combining subqueries with INNER JOINs, follow these steps:
      a. Name the subqueries: To make the query work, you need to name the inner selects (subqueries). This helps avoid ambiguity and ensures that the columns match correctly. Here's an example:
      SELECT *
      FROM (
      SELECT B.branchName, A.type, AVG(T.amount) AS avg_amount, COUNT(A.accNumber) AS num_accounts
      FROM Branch B, Account A, Transactions T
      WHERE B.branchNumber = A.branchNumber
      AND A.accNumber = T.accNumber
      GROUP BY B.branchName, A.type
      ) q1
      INNER JOIN
      (
      SELECT B1.branchName, COUNT(A1.accNumber) AS num_accounts
      FROM Account A1, Branch B1
      WHERE A1.branchNumber = B1.branchNumber
      GROUP BY B1.branchName
      HAVING COUNT(A1.accNumber) > 5
      ) q2
      ON q1.branchName = q2.branchName;
      b. Ensure consistent column names and data types: Both subqueries should have the same number of columns and compatible data types for the columns you intend to join on.
      Remember that subqueries can be powerful tools, but they can also impact performance. If possible, consider using JOINs directly instead of subqueries to achieve the same result.
      Feel free to explore more complex scenarios with subqueries and JOINs to enhance your SQL skills!

    • @juantapia7832
      @juantapia7832 3 місяці тому

      oh great@@LearnitTraining ! Thank you very much for your help dedicated. Greetings!

  • @bevanbooy5468
    @bevanbooy5468 2 роки тому +1

    Hi, did everything according to video, installed SSMS v 18.12.1, copied the text to create the northwind db, no errors, close the program and open again, but no northwind db, please advise.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Bevan! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com

    • @steveroody
      @steveroody Рік тому

      I experienced same problem. After doing everything as said in the video, I still didn’t find the file at the database section

    • @bevanbooy5468
      @bevanbooy5468 Рік тому

      @@steveroody you must use the file depending on your version of software, I got it to work. There are two files one for v12 and higher and one for older versions below v12

  • @seekeroftruth5481
    @seekeroftruth5481 6 місяців тому

    Where did you get the Northwind file from?

    • @LearnitTraining
      @LearnitTraining  6 місяців тому

      Northwindsql Link:
      raw.githubusercontent.com/mic...
      Northwind Alternate: bit.ly/3sIvodn
      If you are having issues with the Northwind DB pleases delete lines 24 and 25 and execute.

  • @LeneSandNielsen
    @LeneSandNielsen 11 місяців тому +1

    I cant find microsoft managment studio as a program on my labtob. ?????
    I have followd the instroction i the video

    • @LearnitTraining
      @LearnitTraining  11 місяців тому

      Hello LeneSandNielsen! Press Windows + R to open the Run Command Box on your computer, type MMC in the box, and hit Enter. This will bring up the Microsoft Management Console Interface.

    • @LeneSandNielsen
      @LeneSandNielsen 11 місяців тому

      @@LearnitTraining i get a window Consol1 with an empty folder

  • @ujjwalmundhra2884
    @ujjwalmundhra2884 5 місяців тому

    Hi all, I've executed the query (NorthwindSql) for database creation. It has successfully executed and completed. However, I do not see this database any where in the object explorer. Please provide the steps. Thank you in advance.

    • @LearnitTraining
      @LearnitTraining  5 місяців тому

      This article may help: documentation.alphasoftware.com/pages/GettingStarted/GettingStartedTutorials/Basic%20Tutorials/Northwind/northwindSQLServer.xml#:~:text=This%20tutorial%20requires%20SQL%20Server%20or%20SQL%20Server,name%20field%2C%20type%20in%20%22northwind%22%20and%20click%20OK

  • @Excoopereal
    @Excoopereal 2 роки тому

    Great job. However, the exercise file is not available. I d really like to have it

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Thank you so much for the kind words Jackie! We are glad you learned so much!

  • @KLNYC
    @KLNYC 2 роки тому +1

    I dont need to save the script first?

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi KwadKen! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com

  • @firdausismail3020
    @firdausismail3020 7 місяців тому +1

    Why is my Northwind file does not appear?

    • @LearnitTraining
      @LearnitTraining  7 місяців тому

      Try using the alternate:
      Northwind Alternate: bit.ly/3sIvodn

  • @theestherealtor
    @theestherealtor 7 місяців тому +1

    How do you download this for a MAC?

    • @LearnitTraining
      @LearnitTraining  7 місяців тому

      This article may help: www.macworld.com/article/672043/how-to-set-up-and-learn-sql-on-mac.html

  • @khansvirtualdiary
    @khansvirtualdiary 2 роки тому +1

    in-queue

  • @JosephKuriaNjau
    @JosephKuriaNjau 6 місяців тому

    Hello, am having a problem creating the northwind database after executing the queries nothing is created...kindly help

    • @JosephKuriaNjau
      @JosephKuriaNjau 6 місяців тому

      Hello guys, i really need help in executing the northwind database, am already executing but no database is being formed

    • @JosephKuriaNjau
      @JosephKuriaNjau 6 місяців тому

      Is it possible to get a script that is working properly

  • @jeanrodrigues6249
    @jeanrodrigues6249 2 роки тому +1

    SQL

  • @anondebennett9219
    @anondebennett9219 Рік тому +1

    omo his SQL northwind file is not processing, i have been to the community site its not helpful either

    • @anondebennett9219
      @anondebennett9219 Рік тому +1

      For those who might encounter same issues of line 24 and 25 , remove them and execute, then you are good to go

    • @LearnitTraining
      @LearnitTraining  Рік тому +1

      Thank you Anonde for the tip!

  • @user-br2gc9ov1q
    @user-br2gc9ov1q Рік тому +1

    please how do i get Northwind.sql file. i cant find it????

    • @LearnitTraining
      @LearnitTraining  Рік тому

      Northwindsql Download Link:
      github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs

  • @didingdharmadi2965
    @didingdharmadi2965 Рік тому

    Hello, I could not find the Northwind.sql file. Could anyone help me, please?

    • @LearnitTraining
      @LearnitTraining  Рік тому +1

      github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs

  • @palepeony
    @palepeony 5 місяців тому

    Has anyone been able to download the exercise files?

    • @LearnitTraining
      @LearnitTraining  5 місяців тому +1

      Hello Pal M! We just tested the links and files. They are currently working.

    • @michalrw5713
      @michalrw5713 4 місяці тому

      YES

  • @tylershaw6598
    @tylershaw6598 2 роки тому +1

    How do I download the script file

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Tyler! All the links to the files you need for class are in the video description

  • @superfreiheit1
    @superfreiheit1 2 роки тому +1

    Thanks for the video, but its to small.

    • @LearnitTraining
      @LearnitTraining  2 роки тому

      Hi Joe! We are currently producing a much longer video series on this topic!