Learn Basic SQL in 10 Minutes
![*](https://i0.wp.com/allprowebdesigns.com/wp-content/uploads/2023/12/1703203019_hqdefault.jpg?resize=480%2C360&ssl=1)
Video Title: Learn Basic SQL in 10 Minutes
Hey check out the fancy logo welcome to statistical programming dotnet where we help you learn all the ways that programming can help you quantify qualify and generally predict your world today we’re going to be learning basic commands from sequel which is the language of relational databases
If you plan to analyze data for a modern business there’s a 95% chance that the data is housed in a data warehouse and sooner or later you’ll have to retrieve it yourself but sequel commands are not quite like any other kind of programming so if you
Are new to it there’s nothing like a good visual representation of what each command command is doing let’s get into that now this video and a lot of learning material I plan to create is based on a visual approach when you visualize something you’re forced to create that thing using your imagination
And doing so will really tell you where you have a solid understanding and where you do not furthermore as you create a visual model of what you’re working with you gave yourself a clear reference point to relate to as you build more complex understanding and that’s going
To work very well as we start with database basics a database is a bunch of rows stacked on top of each other or maybe it’s a bunch of columns that are smashed together side by side no one’s quite sure but what we can all agree on
Is that rows and columns each make up a table now tables have some interesting properties such as their primary key which defines the granularity of the table and also allows them to join two other tables and speaking of the other tables a collection of them is known as
A database and this is the thing that we can query with our sequel scripts since this is a statistical program in net what we’re interested in is the ability to use the data in some environment outside of sequel such as a programming language like Python or even a simple X
Parrot a cool feature of sequel commands is that they’re very phonetic and that they describe a function well so when I think of select which is our first command that we’re gonna learn I picture them taking the items off a cart and place it into my shopping basket so
Let’s look at how the Select statement is written the term select goes first and is always eventually followed by from as in what table or tables should we pull from next we need to tell which columns we want to select in this video I’m just going to refer to columns by
Their color as if that were their name and the names in our example will be blue column orange column or green column these will always follow the word select and always will be followed by the word from oh and don’t forget to separate with a comma except the last
One otherwise you will get an error next we’ll put the table name or names after the word from and we’ll finally have everything we need to complete the most basic select statement so it’d be very limiting if we could only grab whole columns from our tables as many databases can attain hundreds thousands
Even millions of rows the where statement acts as a way to filter out rows you don’t want to include in your results for this example I’m using the dark colored lines within the cells to represent values notice the two red values in our bloom column suppose this
Column refers to order status for some ecommerce site and dark red values represent cancellations of some kind and we want them excluded from our select statement to do so we’re gonna add where blue column does not equal dark red aside from does not equal just as an
Aside we could also use a greater than a less to men value an equal sign in or not in to filter out a group and or a few others but we’re going to keep things simple with this does not equal Satan so getting back to it it’s important to
Understand that this has the effect of filtering the results before they are accessed in our query so our red records here are gonna basically be filtered out before the rest of the data is selected and this is what this is going to look like kind of visually the red records
Disappear and our select statement our data is now ready to be used in our select statement so the where statement always goes at the bottom of the query and our final statement will look like this beautiful but wait I thought sequel was all about querying databases not
Just tables it is that’s where joins come in adding a join clause to your select statement allows you to combine tables based on some common key in our select statement that join clause appears after the word from but before a wear statement which we don’t have in
This example we select from our first table and then add the word join followed by the second table we wish to pull from like so then to complete the clause we identify the columns from each table on which they’ll join side note they don’t have to be the exact same
Name they just have to contain values that will match up with each other the joint works by matching exact values from one column to the other notice here that our red and green values are not physically matched on the same rows the join will shift each row based on the
Value it’s joined column matches up to watch the table on the right closely as the entire rows move to match the blue columns together finally once the join columns are aligned the two tables are merged together and then just like in the where statement this merge allows the select
Process to begin so while the joy we just learned merges tables side by side the union matches tables or a single column top to bottom a basic example is a union statement sitting between two select statements the union says that after the blue and yellow columns are
Selected from Table one they should be placed on top of the blue and yellow columns of Table two notice we had the exact same column names the union can only occur on tables with the exact same column names and where the columns being Union have the same data type so in the
Past I have emphasized that a filter or a join happens before the Select statement in the case of this query the Select statements go first followed by the Union which results in the two tables converging via their columns the last sequel command that I’m going to go
Over is the group by clause the group by is necessary in the Select statement when there is a mathematical operation being performed over one or more of the columns but there also exists a column with no operation being done to it the group I sits at the end of the query
Followed by the column or columns that are not part of the mathematical operation in this case the blue column in our example this query performs the sum function over the green column with respect to the unique values in the blue column you’ll notice the values in the green column that correspond to the
Duplicate dark red and dark green values in the blue column will be combined in total together for our final result this has been a basic walkthrough of the commands an analyst is most likely to use while queried from a database although each command represents a simple concept
There are derivation of each that can become quite complex writing expert level sequel queries can involve many combinations of the commands discussed in can approach the skill level of actually an art form but it’s all based on the fundamental understanding of the basic concepts later videos will dive
Into each of these commands in more details and also some more advanced sequel strategies until then Godspeed and thanks so much for watching
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
If you need a gift this year, check out my lil side project: quickandeasygifts.com! Video coming eventually on how to build an income-generating website.
Would this video help for QA tester?
Very good tutorial!
can u suggest any sql software to download which we can practise at home
God bless u bro for giving all this knowledge out for free
great video
I've recently viewed a couple of other youtube channels and so far from the couple of videos I've watched none of them don't break it down to the bare bones of what SQL really is? its usually a youtuber instructing you to download my "mysql" or or some other application to download, then they provide a poor tutorial on the subject by over explaining the subject. I appreciate the simplicity of how you introduce the subject matter. The video was simple and to the point and wasn't over elaborate, thank you.
Love it. Wish I didn't have so much trouble telling your blue from purple, but I can still follow.
The last one confused me, only the dark red/green were added up why?
I love the way you visualize what the code is actually doing, great work.
Thanks, really helpful.
New to SQL but why does the RED values get filtered in the other columns aswell? Since you only specified where Blue column <> RED
got a test in 2 hours. wish me luck boys
Thanks for the video! Very helpful.
best sql tutorial thus far
Thanks for the free and useful Tutorial!
Thank you 🙏
Thank you very much, James, for this video! It was really simple to understand and I learnt a lot!
Put the volume a little higher when you export plz
Color blind people:
Love you dude
Very useful..Thank you hun..You earned a new subscriber..
I like your approach to teaching thank you!
6:26 Thank you, this visualization really helped joins click with me.
And, uh, I got a job as a Senior SQL Engineer after watching it…
This visual explanation makes it possible for my newb brain to actually understand what the commands are doing. Thank you!
This is such an eloquently simple explanation of SQL basic concepts.
Thanks for the video! My professor is an idiot and I'm really glad that this great video was made for desperate fools with exams in the morning like me.
finally an accent that is clear and understandable!
Thank you so much
Fantastic demonstration/explanation/introduction! Thank you! This is personally very helpful for me.
Anyone ???
2020-10-08
"Or a bunch of columns smashed together!! No one knows"
Never Subscribed so fast!!
Very good explanation. Anyone does not teach like this.
thank you, this was a useful vid
This is brilliant. I'll use similar examples to teach others and I'll refer them to this video as well.
This video is great! Explaining visually how SQL understand the commands is just the most effective way! Thank you a lot for the job!
This is brilliant .. really
Thanks, man! I am thinking of taking some online classes to learn a new skill but I was worried I might not understand how this works. But with this visual walkthrough I think I should be able to get a firm grasp on it.
Thanks for this James. Very helpful!
I am color-blind so what I saw was different shades of grey columns and grey dashes… 😩 Nice job… Although good tutorial…
Very good , keep it up
Simple and Clear ….. Thank you
Azure Data engineering for beginners
https://www.azuredataengineeringtuotorial.com
Such a helpful video. Explained it better than most other YouTube videos i've watched.
great
ive been learning sql, i worked in a transport office where they used access and excel and it just didnt work, so I thought id have ago at building a full transport and warehouse db, which so far works easier and better. However with the db built, would you have to build a gui or some software to use it externally? As ppl who cant use sql wont know how to do it, however if they had a simple userface, it would just need inserting and would update itself
Great video! It even helped me understand the Join Tables function in ArcGIS! I really appreciate the visual here. Trying to get traction teaching myself GIS and indexing has not been easy. There are so many amazing open source programs and free education tools out there, but so much of it doesn't start with properly orienting the student. Context, application examples, and visuals are really helpful. 🙂
Quick question: What language would you suggest I learn for library/museum indexing? I want to be able to sort collections, extract data I can put into tables, and then use those tables to potentially create visual representions of the data through ArcGIS. I am working on learning Python right now. I am not sure that will be enough, though.
Uses some difficult words.
this video age like a fine wine
Fancy logo James :d
Thank you for this amazing tutorial!