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.
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/
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
You're very welcome!
@@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
@@kolvis78 not only you self, me too
@@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.
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
You are so welcome!
Very good tutorial, straightforward.....have learnt alot. Waiting patiently for the intermediate and advanced Sql tutorial from this Channel.🙏🙏👏👏
Thanks!
Wow. What a great course! Good job😄 I learned the basics of sql in 3 days and ready to go. Thanks!!
Glad it was helpful!
Great instructor! Thank you so much for this course, Christina. Your guidance has been invaluable and truly appreciated
You are so welcome!
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.
Thank you for watching!
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.
Thank you so much for kind words!
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
More to come!
I enjoy Dan's tutorial as well.
Trying to find more and there's none
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 :)
Thank you for the kind words!
@@LearnitTraining please how can I get the northwind file please, because I can't see it sir.
WOW What a best instructor! this is the most comprehensible SQL tutorial I have came across so far !✅✅✅
Glad it was helpful!
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.
You're very welcome!
You guys make such good courses. I could learn anything explained by you.
Thank for the kind words Lori!
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
Hi Deny! We are producing a much more robust SQL Reporting Services video series coming soon!
Very great SQL course and very specific. Thanks for sharing.
You are very welcome Terry!
Pretty neat, simple, and well-explained! Thanks for this tutorial! It helps me a lot!
You are very welcome! Thank you for watching!
How to download data from github?
Cant Wait for your full SQL course!!! so exited!!! 🤩🤩🤩
Soon!
This is an incredible tutorial. I'm at the 1:57:00 mark and have already learned so much. Well done on teaching this!
Awesome, thank you!
@@LearnitTraining please sir, I can't see the northwind file please where can I get the file, sir.
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
Thank you so much for watching!
i love it! looking forward intermediate and advanced sessions as well. thankyou so much for the open upload of such quality content
You're so welcome!
I watched a full, 3 minutes long advertisement as a simple way to support this marvelous channel:-;
Thank you so much! Small things like that help us tremendously!
Very clear lecture and easy to follow, thank you ! 👍
You are welcome!
Excellent,although very basic. Looking forward to your intermediate and advanced level of sql server tutorial 👍👍
Coming soon!
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
@@LearnitTraining How soon? it's has been 2 years now.
Great Video, easy to follow and clear to understand
Glad you enjoyed it!
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
Thank you so much for this great tip!
Thanks alot......
Very insightful tutorial. Very helpful for me learning SQL on my own
Great to hear!
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
Glad it helped!
Very helpful video! Thanks for all the hard work.
Our pleasure!
Awesome Work, I have learnt alot from this. Thanks so much for the good work indeed.
Glad it was helpful!
was really waiting for it.... thanks in advance learnit.
Most welcome 😊
Thank you for uploading such a helpful video tutorial
You are very welcome!
Great content :). Will we be getting a complete course with advanced and expert videos?
Hi Tommy! This is just a single course for now. We are working on more SQL videos however!
Super useful! Thanks 🙂
Glad to hear that!
Next level please 😀
Very well explained video.
Very good.
Thank you.
You are welcome!
@@LearnitTraining Thank you
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.
👏👏👏👏👏👏👏 thanks for breaking it down.
Glad it was helpful!
Fantastic tutorial
Thank you for the kind words Jean Pierre Beuses!
A great tutorial and a nice voice
Thank you kindly!
Thanks very much
You are welcome!
I can't wait for the Intermediate Tutorial video
Hi Meow Meow! It is in production!
amazing video!!
Thank you for watching Pratham!
Amazing Explanation 👍👍
Thank you for watching!
well done- VOICE of sql ;)
pięknie podane, z jajem-tak to ujmę:)
Thanks!
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
Thank you
You're welcome
I cannot download Northwind. From the video description. How can i do it?
Thank You Madam
You are most welcome!
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
Glad it was helpful!
The content in course is very good. Are we getting complete course?
Hi Kyasa! We actually combined the course into one, but we are working on more SQL videos coming soon!
thank you
You're welcome
Great :)
Thank you! Cheers!
thank you I could use that alternative website but I want to know why I couldn't add that database into my SQL SERVER?
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.
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.
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
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.
This article may help: learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases
Hey, what was the name of the datebase that appeared in SSMS? Is it Northwind? The name im getting is "pubs"...
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.
Hi Jacob! You can get your question answered at Offsite, our online community - www.offsitebylearnit.com
Thank you, dear! Will you teach intermediate, advanced, and professional skills? I want to learn your lessons.
We have a SQL Admin video series coming soon!
Awsome
Thanks!
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?
Hi The Generational Wealth Guy! You can get help at Offsite, our online community - www.offsitebylearnit.com
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?
Hello Thanh Phan! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com
We need the intermediate and advanced version of sql server:)
Hi Josue! Those videos are currently being produced! We will have 6 brand new videos on SQL Reporting Services soon!
Great
Thanks!
Great Content.
Thanks a lot.
Glad you liked it!
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???
If you are having issues downloading the northwind file please use this online practice lab: www.sql-practice.com/
Can't create Northwind database. Code in GitHub seems broken.
Hi, i can t file the file northwindsql in the provided link... can you please let me know where should i look?
Northwindsql Download Link:
github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
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
If you are having issues downloading the northwind file please use this online practice lab: www.sql-practice.com/
hi transfer northwind file and then execute it but the database won't be shown in the section of database, what should I do?
You can also practice using this site: www.sql-practice.com/
is pivoting for beginners? :)
I did not see the northwind database after logging back in
Can u teach us VBA in Access aswell? would be awesome too !
Yeahnick! We will definitely look into getting that add to our video production list
@@LearnitTraining awesome!
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?
Northwindsql Download Link:
github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
@@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?
Can I get a follow up to this Video..? Say the Intermediate and the Master and Expert level..... ..!!!
Hi Aamir! We currently have a full scale SQL class being recorded. It will be a 5 video series. Coming soon!
Please where's the link to these class file described at 0:12 ?
Please I need help to find them
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
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.
Hello Nwadike! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com/
4/21/2023 ~4:30
This may be a stupid question but how do I download the Northwind data?
Well that Northwind DB is a 20 year old database. She should be using the new Adventure Works 2019 database.
Hi 9 to 5 Voyager! The link to the Northwind data is in the video description
seems interesting but I cant get the Northwind code off the site so I am at an early stop
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 :(
Hi Erajie! You can get your question answered at Offsite, our online community - www.offsitebylearnit.com
how do I download the Northwind data? There Is no Northwind SQL in the link now.
Hi Peacemind888! The link to the Northwind data is in the video description
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.
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.
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!
This article may help: learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/linq/downloading-sample-databases
Great job, thank you very much!
I don´t understand the difference between JOIN (or inner join) with subqueries. Can you explain me, please?
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!
oh great@@LearnitTraining ! Thank you very much for your help dedicated. Greetings!
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.
Hi Bevan! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com
I experienced same problem. After doing everything as said in the video, I still didn’t find the file at the database section
@@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
Where did you get the Northwind file from?
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.
I cant find microsoft managment studio as a program on my labtob. ?????
I have followd the instroction i the video
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.
@@LearnitTraining i get a window Consol1 with an empty folder
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.
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
Great job. However, the exercise file is not available. I d really like to have it
Thank you so much for the kind words Jackie! We are glad you learned so much!
I dont need to save the script first?
Hi KwadKen! You can get help directly from our instructors at Offsite, our online community - www.offsitebylearnit.com
Why is my Northwind file does not appear?
Try using the alternate:
Northwind Alternate: bit.ly/3sIvodn
How do you download this for a MAC?
This article may help: www.macworld.com/article/672043/how-to-set-up-and-learn-sql-on-mac.html
in-queue
Hello, am having a problem creating the northwind database after executing the queries nothing is created...kindly help
Hello guys, i really need help in executing the northwind database, am already executing but no database is being formed
Is it possible to get a script that is working properly
SQL
omo his SQL northwind file is not processing, i have been to the community site its not helpful either
For those who might encounter same issues of line 24 and 25 , remove them and execute, then you are good to go
Thank you Anonde for the tip!
please how do i get Northwind.sql file. i cant find it????
Northwindsql Download Link:
github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
Hello, I could not find the Northwind.sql file. Could anyone help me, please?
github.com/Microsoft/sql-server-samples/tree/master/samples/databases/northwind-pubs
Has anyone been able to download the exercise files?
Hello Pal M! We just tested the links and files. They are currently working.
YES
How do I download the script file
Hi Tyler! All the links to the files you need for class are in the video description
Thanks for the video, but its to small.
Hi Joe! We are currently producing a much longer video series on this topic!