SQL Full Course 2026 [FREE] | SQL Tutorial for Beginners | Full SQL Course 2026 | Simplilearn
Skills:
SQL Analytics90%
Key Takeaways
Covers SQL basics, data filtering, aggregation, joins, subqueries, and database management using SQL
Full Transcript
[music] Hi there, welcome to Simply Learns YouTube channel. Today we bring you the SQL full course. SQL or structured query language is the backbone of data storage retrieval and analysis. Whether you're a developer, analyst or aspiring data professional, mastering SQL is essential for working with databases effectively. In this free course, you will learn everything from basics to querying data to writing advanced queries, joining multiple tables, and building real world database solutions. We will also cover techniques used in projects and prepare you for interview scenarios to help you land in your next data role. By the end of this course, you will be able to confidently extract insights, manipulate data, and create efficient SQL queries for any database systems. Now let's go through the agenda. This course covers introduction and basics of SQL where we will understand databases, tables and some simple queries. Followed by that we will have data filtering and aggregation where we will explore where clause, group by clause, order by clause and some aggregate functions. Followed by that we have joins and relationships where we will explore joins like inner join, left right f join and we will also combine some tables. Next ahead we have subqueries and nested queries where we will be using queries within queries for advanced data retrieval. Then we have common table expressions or CTE for short and window functions where we will be simplifying complex queries for data. Then we have manipulation and transactions where we will explore insert, update, delete and transaction control. Next ahead we have a hands-on project where we will be building a mini database and solve real world problems. Then we have SQL interview questions and tips. So here we will practice common queries and patterns asked in interviews. That said, if these are the type of videos you'd like to watch, then hit that like and subscribe buttons along with the bell to get notified whenever we host. Also just that you know if you want to upskill yourself, master data science and data analytics skills and land in your dream job or grow in your career then you must explore simply learn cohort of various data science and data analytics programs. Simply learn offers a wide variety of masters certifications and post-graduate programs in collaboration with some of the world's leading universities like Peru University IIT Guati and many more. Through our courses, you will gain knowledge and work ready expertise in skills like Python, Tableau, PowerBI, Generative AI, and over a dozen other. That's not all. You also get the opportunity to work on multiple projects led by industry experts working in top tier data companies and product companies. After completing these courses, thousands of learners have transitioned into a data science or a data analytics role as a fresher or moved on to a higher paying job and profile. If you are passionate about making your career in this field, then make sure to check out the link in the pen comment and description box below to find a data science and data analytics program that fits your experience and areas of interest. Now, let's get started with a small quiz question. So, here's the question. Which SQL clause is used to combine rows from two or more tables based on a common related column? Your options are A where B join, C group by and D the last one ordered by. Please do let us know your answers in the comment section below. Now let's get started. Now we enter the module one. So the module one will be about the introduction to SQL and database basics. So what is SQL is our first question and why is it important. So today SQL in simple terms or let's expand as structured query language is the standard language used to store, manage and retrieve data from relational databases. In very simple terms, SQL acts as a communication layer between humans and databases. Instead of manually browsing data through files or spreadsheets, SQL allows us to ask precise question to the large data systems and receive accurate answers almost instantly. You can think of SQL as the grammar of data because just like grammar helps us form meaningful sentences, SQL helps us form meaningful data queries. So through SQL, we instruct databases to perform critical operations such as searching for specific information, updating existing records, inserting new data into the entries, deleting or removing outdated data, and organizing information using tables, views, and schemas. Without SQL, interacting with structured data at a scale would be slow, manual, and completely errorprone sometimes. Now, why is it important? SQL turns raw data storage into an intelligent queryable system that businesses completely rely on. Now you might be wondering why SQL still dominates in 2026 despite hundreds of new technologies and tools and frameworks emerging every single year. So the answer is SQL continues to dominate the data ecosystem in 2026 and in future because this is not by accident because SQL solves a fundamental problem reliable access to structured business data universal adoption. Every major organization whether it's Google, Amazon, Meta, banks, hospitals or e-commerce platforms they rely on SQL powered databases at their core. Even modern cloudnative systems ultimately store their most critical data in relational databases using SQL and they also query that data using SQL. Next is standardized language. SQL allows an standards which means once you learn SQL the same knowledge applies to MySQL, post SQL, SQL server, Oracle, Snowflake, BigQuery, Red Shift and many [clears throat] others. This portability makes SQL a career safe skill that remains relevant across tools and companies. Next is essential for analytics and AI pipelines. In analytics and AI workflows, SQL is often the very first step. Before any dashboard, machine learning model or AI system is built, SQL is used to extract lean, structured and reliable data. In many ways, SQL is the foundation layer for datadriven intelligence. After that, we have high performance with massive data. Modern SQL engines are highly optimized and can process millions or even billions of rows of data in just mere seconds. Features like indexing, query optimization, and parallel execution make SQL extremely efficient for large scale data operations. Now, the next question is where do you see SQL in real life? Although users rarely see SQL directly, it silently powers many everyday systems we interact with. Whether you book a flight, withdraw some cash from ATM, place an online order, or check your bank statement, SQL queries are running behind the scenes. SQL also supports food delivery applications, telecom recharge history, hospital records, and customer support systems. Each of these systems rely on fast accurate retrieval of structured data which SQL excels at. A useful real life analogy is to think of SQL as a remote control for business data. Successful learners who master SQL gain the ability to instantly switch to exact channel of information they need whether it's sales data, customer retention or customer records or transactional history without delay or dependency on others. So the next one is types of databases. So we have two types relational databases or RDBMS and non- relational ones. Let's get started with RDBMS. A relational database stores data in tables made up of rows and columns. Similar to Excel spreadsheets but with far more structure, rows and reliability. Each table represents a specific entity and relationships between tables are clearly defined. Relational databases enforce consistency through constraints and relationships, ensuring that data remains accurate and reliable even as systems scale. They follow ACID or popularly known as asset properties which guarantee transaction safety making them ideal for business critical operations. Since relational databases are SQL based, they allow precise querying and strong validation and predictable behavior. Most popular examples include MySQL, PostSQL, SQL Server, Oracle and Maria DB. All of which are widely used in enterprise systems. Now let's discuss the second type which is non relational databases or simply known as NoSQL. Non- relational databases, commonly known as NoSQL databases, store data in formats designed for flexibility, scalability, and speed rather than strict structure. Instead of fixed tables, they often use JSON documents, key value pairs, columns, or graphs. These databases are designed to handle large volumes of semistructured or unstructured data and are commonly used in microservices, IoT platforms, real-time applications and distributed systems. Some of the popular examples include MongoDB for document storage, Reddus for key value access, Cassandra for column based storage and Neo4j for graph-based relationships. NoSQL systems trade strict consistency for flexibility and scalability in many use cases. Now in the next stage, let's discuss the basic fundamental differences between relational and non-reational database systems. So relational versus non-reational analytical comparison. Relational databases focus on structured data, predefined schemas and strong consistency. They are ideal for transactional systems, reporting and business logic where accuracy is critical. SQL serves as a powerful and standardized query language in this ecosystem. Non-reational databases on the other hand prioritize flexibility, horizontal scaling and high-speed access. They allow schema changes without downtime and are better suited for rapidly evolving data models. A strong analogy is to think of RDBMS as a well organized library where every book has a catalog number and fixed location. No SQL is more like a creative studio where items can be placed freely based on immediate needs without any rigid structure. So what is RDBMS? A relational database management system is specialized software designed to store structured data and manage relationships between different data entities. It acts as an engine that processes SQL commands and ensures data remains consistent and secure. An RDBMS is responsible for enforcing rules, managing user access, and handling backups, recovering from failures, and even ensuring that multiple users can work with the same data simultaneously without any conflicts. In short, the RDBMS is the backbone that makes SQL reliable, scalable, and safe for enterprise use. Tables represent real world entities such as customers, products or orders. Each table focuses on a single concept keeping data organized and easy to manage. Next is columns. Columns define the attributes of an entity such as name, email or city. Each column has a specific data type and rule set that governs what value it can store. Rows. Rows represent individual records within the table. Each row captures a complete instance of an entity such as a single customer or transaction. Next is the primary key. Primary key uniquely identifies each row in a table, ensuring no duplicates exist and enabling efficient data retrieval. Foreign keys create relationships between tables by linking related records, helping maintain consistency across the database. Next is indexes. Indexes function like a book index allowing the database to locate data quickly without scanning every row. Followed by that we have constraints. Constraints enforce data quality rules such as not null, unique and check. These rule help preventing invalid data entry entering into the system. Now the next stage is by RDBMS is the industry standard. Our DBMS systems are highly reliable and trusted for business operations that cannot afford data errors. They enforce data integrity, support normalization and handle complex transaction workflows efficiently. Because of these strengths, companies use RDBMS platforms for mission critical applications like billing systems, HRMS, ERP solutions, inventory management and logistic platforms. When accuracy, consistency and reliability matter, RDBMS remains the preferred choice. Now comes the next stage where we will learn the installation and setting up SQL environment. So now we have come to a stage where we will install MySQL into the system. Now it's really simple. All you need to do is just you know type down MySQL workbench on your browser and then you'll be redirected to this particular page. use the first link MySQL workbench or you can also go with the download option and here you have the download now option right so you can click on this and your installation file or the setup file will be downloaded for you and you just have to run that particular file it's a simple installation procedure but if you have any queries don't worry I'll also drop a link to this particular tutorial on how to install and run MySQL workbench for now we have already installed MySQL so let me run that so this is my database case which is SLP database. So um you can see on the right hand corner of my screen we have an option that says the position of all the prompts and all the sections of this particular workbench. So I'll go with the first option where I can see all the databases I have and the tables I have. Right. So uh right now we are in u the uh table that we earlier created for interview questions and answers. So this will be in the down the line. So let's go to any of the databases. I would like to go with uh this particular one sample data set. So I'll be using the SLP database. So we can test our SQL database in this way. You can uh start by selecting any of the databases. Don't worry. Uh in the upcoming section or the upcoming module, I'll explain you how to load the data, how to create table, how to insert the values into your table and all those fundamental things. So first for the beginning section to test our SQL installation we'll do this. So before you get into anything you just need to select the database where you have the data. So you can do that by simply command which says use the database name. This is the font. So let's say use and database name and you need to have a semicolon right. So uh you can also see why I'm using specific format. I'm using uh let me expand my screen. I'm using all caps for the keywords in SQL. We have keywords and also the userdefined words, right? So the keywords are something which carry a functionality. So here if you see we have a select from where not end, right? These are keywords. They have specific functionality and whatever the things you see in a black color which have you know case sensitivity in lower case or sentinel case those are the ones which I define. So tomorrow if my query gets a little more complex so down the line we will be learning subqueries and advanced querying functions where we should be at a stage where we should identify our own code. If you follow or you know some mixed kind of way to write your queries then you might fall into a confusion understanding what is what is it a keyword or is it a word that I define or is it the name of the column or anything the name of a table which I define. So to avoid such confusions we will follow this standard. If ever there is a keyword just keep it in all caps and if ever there is a column name or a table name then you can keep it in mixed case or low case as for your requirements. So product ID this particular name is a column name so that I identify it as a column name. I'm using mixed case there. So it has a caps thing and then uh the you know all small letters in that way. So basically you need to select a database name and explain MySQL work that I'm going to dive into this particular database which is SLP and you can see I have complete access here. So if I expand this particular section you can see uh SQL gave me a green to go and then I can also check what are the tables present in my database. So for that you will be using show tables controll enter and these are the tables which I have bonus book collection book order clone consolidated student information and know uh employee details etc. So now if I want to u understand employee details what I'll do is copy this uh row copy field and then I'll simply write down a select statement right we will also understand what exactly does select from and every aspect every syntax of the statements in the upcoming module but now we just testing the condition of the installation that we have done. for that. So I'll be writing down select. So you can see when I type you can see some auto suggestions but don't take any auto suggestions. Follow a strict format for yourself. So select star which means all the columns. So maybe I'll be having five columns six columns in this particular data set or data table. When I indicate star automatically my SQL workbench will understand that user wants to query or extract all the columns from the table. If I dedicatedly provide let's try that as well. So from and remember the field that we copied just pasted and remove the single quotes and at the end yeah without semicolon your query will run but to follow a strict syntax we need to enter semicolon. Now let's hit enter to find out the entries in our data set. So we have five uh columns you can see we have employee ID, employee name, age, department and salary. So now let's say I just want the employee name and their department. In that case what I can do is quickly copy this and paste it somewhere here. And instead of star I will write the dedicated column name emp name. If your intention is to extract specific columns then you need to specify them and separate them using a comma. Now I want employee name and department. So I'll write emp name column comma separated both are separated by comma and department right. So let me run this and I'll have okay there was some error. Copy field name and I'll paste it here. Yeah, I think that was a small spelling mistake. Not to worry. Enter. There you go. So we have John Doom and uh all the other employees Jane Smith and Michael Johnson and their specific departments. Now let us understand something a little more detail. Let's say the user wants to extract specific employees from IT department. How do we do that? We do that by adding a where clause. So these are clauses don't worry. Uh we're just testing it out. In the upcoming module we will be going deep diving into each and every part of this. So where our department is it. So since uh this is a character data type it will be inside codes it semicolon. Remove the semicolon and everything is good to go. Enter. And we will have the details of all the employees who are in IT department. So this is how um a basic uh query on a MySQL workbench works. Now we have a briefing on the understandability and working functionalities of the MySQL workbench. Proceeding ahead. Proceeding ahead we have the choice of SQL engine for learning purposes. So MySQL and Post SQL both are excellent choices. MySQL is known for simplicity and ease of use making it ideal for beginners and web applications. On the other hand, postrele offers more advanced features and widely used in analytics and data engineering roles. Both databases are open sources, stable and production ready, making them perfect environments for learning SQL fundamentals. Now we have common installation issues and fixes. Beginners often face issues like port conflicts, authentication mismatches or missing environment values. So these will be the common issues that you might be facing during the installation process. Don't worry, we will be linking the complete installation and setup video in the description box below. You can go through that and it will have all the mistakes and all the possibilities of creating mistakes and all the permutations and combinations of the problems that you might be facing in real time installation. It's a completely detailed tutorial. So it might take a lot of time off this particular session. So for that purposes we have created a dedicated tutorial for installation. So we will be linking there. Now why these issues come? Because you might be having Jupyter notebook or any other platform that deals with databases like MySQL as well. So you might have to dedicatedly create a port for their access. So if there is a port conflict or any kind of authentication mismatch, you might face these. So you have that all covered in that session. Understanding these errors early prevents frustration and best troubleshooting confidence. Addressing problems such as 3306 which is a post number conflict or PG admin setup bridges for post SQL failures helps learners become self-sufficient and comfortable with database tools. Now let's go through best practices for beginners. So some of the best practices are you should learn always to create a dedicated practice database to avoid accidental data loss. Using meaningful table name and column names improve readability and long-term understanding. Packing up data before experiments and maintaining a personal SQL notes file helps reinforce learning and builds good habits from the start. And that brings us to the end of module one. And next will be the module two. So now we have entered module number two. So this module number two gives us a brief introduction to the basic commands in SQL. So this is all about how to create a table, how to insert data into a table and then when you start querying, how do you query, right? For a basic example, you have select. So select in SQL means you're trying to explain the SQL workbench that you want to select something from a table that you just created. So there might be many number of tables. For this sample execution, we're going to create five tables and you must specify which table are you focusing on, right? So for that you might have to give SQL table name along with the select statement and then what do you want to select? You want to select a specific column or all the columns available. So there are again specific ways to select the columns again. If you want any particular column from the table, you need to specify the column name. Or if you want to extract all the tables then you don't have to write all the column names you just write an asterisk and then all the values will be extracted for you. And if you want to filter out let's say there is a condition where you want to filter out all the employee details where department is equals to HR then you will go ahead with one filter query which is where right that particular where is a clause in SQL. So this can help you understand how simple SQL is. It's just a verbal language. You talk to your database and you'll get the queries. It's as simple as that. Right? This is what makes SQL so exciting, so resilient, so reliable and so relevant to the current IT standards and industry standards wherever data is related to it. So now without further delay, let's start by creating a simple table. Right? So now you can see on my screen uh we might have to use the database first. I have already created a database on the name interview and this particular database will be used by us in upcoming modules maybe two or three times for interview questions and answers and joins and for now we are just working on the basic terms of creating and filtering data and extracting data insights. So I'll be using this particular data set and if you want to create a new data set it's really simple. You go to file and here you create a new model and then you add the names to your model and all those things or you can also go ahead with this particular option. create a new schema and then you name your schema as sample sac and then you can choose a default location and all those default things for yourself and then apply and then you create a schema if you want. apply and finish. For now, I don't want to create this one. So, I'll just close it. And once you create the schema, everything is straightforward like we are going ahead with now. So, once you create a database, you need to remember the database schema name. But now, I've created this particular interviewer schema. So, to begin with adding any of the tables or adding any of the data entries, I need to specify the database I'm using. So you can see on the left hand side we have a lot of data schemas. We have car dealership uh credit card data interview sample sample stop. Right? This is the one sample schema test that we recently created. Right? You can drop the schema. Drop now. So we have removed it. That's the way you delete a schema if you want. Okay. That's let's take it as a learning step in case if in future if you wanted to delete any schema. So now I want to get the access to interview schema the one which I created already. So how do I get access to it? Again SQL is really simple. You just need to write down use use schema name which is interview. Done. Semicolon. Now SQL understands. Yeah user wants me to use this particular schema on the name interview. So let me expand this so that you can see better. I hope the code is visible clearer. So now you can select the entire query and use this particular flash logo to execute or the best way I use is hold control and press enter. That is the best way or a shortcut to select the database. Now comes the next step where you want to create a database. So again let me uh tell you this. We have uh linked this particular code document in the description box below. You can open up the code document and follow along with us so that you have a better learning experience. And I've also saved this particular code documentation on a notepad for quick access. But before going with the quick access, let us manually type the table names and enter the data or the insert commands so that we have a decent understanding. Let's go back. So uh the first table that we will be creating is departments. Now you can see this particular double code right. If you have programming background then you might have uh something called naming conventions or tagging or coding right it will not be executed in real time but it will act as a note or a you know sticky note that you leave on your code so that so any of your fellow developer understands what's happening here. So I've uh reusing I'm using these double hyphens here as a quote so that my fellow developer will understand so that my fellow developer will understand that I'm creating a data table which is named as department. So the simple command for this is create. So you want to create something. So you just write create. What do you want to create? I want to create a table. Right? So you can see that whenever we write something we are using or I'm using a separate naming convention right. So here you can see I used uppercase for the keyword use. So anything which is getting highlighted as in a blue color is a keyword. A keyword has a dedicated meaning and it cannot be used for normal purposes. It can be used only for SQL purposes only to make SQL understand what is your step or what is your intention. So use uppercase for all the keywords and use mixed case or sentence case or lower case preferably for your uh names right for the table names for the column names for the row entries or anything which is from your end basically anything which you are giving the users which you are giving to SQL should be in lower case so that you can differentiate for now we are just trying to write two or three lines of code two or three lines of query that is easily understandable. But in future you will be writing subqueries. You'll be writing joins and a lot of more complicated queries where at least you'll be writing 10 to 12 lines of code. In that particular scenario, you must be capable to understand which is a keyword and which is a userdefined word or a name or a column name. Right? So a metadata basically. So that's the naming convention you should be following. So understand what's the difference between a keyword and what's actually the name that you have given to your column name or a table name which is basically userdefined. So you can take it in programming terms which is userdefined which is internal implicit design right implicit function. So I want to create a table. So write create table and what's the table name? So my table name is departments. So this is my table name. So what do I have inside my table is my next question. So inside my table I want to have a couple of columns. Let's say two columns department name and department ID. So for that I need to write down DPT ID and uh data type is integer. I want to provide integer data type for it. So basically before we continue let me tell you something. So whenever you want to add columns, you need to add column name. Okay, let me comment this. Column name along with its data type. So this is a set. So whenever you try to enter a column name, you should follow this particular approach where SQL understands this is a you know it's a a a combination it's it's an entity which is made of two things name of the column and what's its data type right so this is the naming convention that you should be following so I want department ID as the first column and the next column is department name right so for this particular department name I want to go ahead with workat and uh work is also another data type and for that data type you can allocate number of locations to you know save that particular department name so for a basic request I think I'd like to go with uh 50 uh character spaces and uh that should be good enough for writing my department names and then you can close the uh command and write a semicolon to end the query So your query will run without a semicolon but for safer programming practices consider it as a protocol so that you or any other developer who is reading your commands will understand that it is the position where this particular query ends. So use a semicolon for that. This is pretty good but remember we might have to work on joints in the future modules. So joints is nothing uh different from the VLOOKUPs or the relationships or the data modules that you have seen on PowerBI, Excel etc. Basically you're combining two or three different uh tables together. Let's say you are ordering something from your online websites and for getting that particular product to your location you're providing your address, phone number and all the details, right? So in a similar way when you want to access data from a different table you might have to establish connection between them. So to establish a connection between the two tables you might want something called as a primary key and a foreign key. So primary key and a foreign key act as phone numbers or an address location or basically something which establishes the relationship between them. So now this particular thing you need to understand a primary table in one table is the one which connects with the same primary key in another table. But in the other table it is termed as a foreign key. In my table department ID would be the primary key. It will be unique and it will not be null. And this particular department ID can also be another table. It can also be unique. It can also be not null and it will not be empty. But in that particular table, it will be termed as foreign key. The same primary key in a different table is termed as foreign key. But the same primary key in the dedicated table is termed as a primary key. So now I want to term my department ID as the primary key in my table. For that you just need to write one more sentence here. One not even a sentence, one more word. You just need to specify primary key and that's done. So primary key and done. Now what happens is SQL will understand you want to create a table and the table name is departments and you have one department ID column two department name column and the data type for department ID is integer and the data type for department name is work and you have provided 50 spaces or 50 data spaces or addresses for your naming your department name right and out of which department ID is the primary So these are the details that you have given to your uh SQL uh workbench and you should be ready to create a new table. So now let's head back to the notepad where we had created the code. This is the one. So create table department ID is equals to int primary key department name is work 50 locations and semicolon. So only difference is there are some indentations done. So what is an indentation? Just like any other programming, you also provide dedicated spaces, new lines so that the fellow developer understands where is what. So this is the indentation we have followed here. We are creating a new table department and the first column is department ID. It is an integer data type and it's considered as a primary key. The next column is department name. Its data type is worker which is a character data type. We have provided 50 spaces and then the end of the uh command. Right? Now comes the insert command. Now again similar to table creation, inserting data into a table is also simple and easy. So all you need to do is specify the operation that you want to do. It is insert. I want to insert data but into which table. So I want to insert into table which is departments that we recently created. You can simply copy and paste the departments table name here. And what are the department columns you have. So I have two columns there. I'll take department ID and department name and now these are the values I want to insert what are the values so again comma separated values the first is ID so you can you don't have to write any quotes but the second one is worker so character data types must be specified in uh single quotes. So this is the first entry comma separated values. The second one is number two, single quotes. And what's the next one? Maybe engineering. And again a comma separate and uh third team could be uh finance separate by comma. Fourth team can be marketing. So I don't have any further rows here. So what I can do is um I can close this particular indentation and write a semicolon to explain the end of this particular query. So now similarly you can just execute this and add the values. So let's head back to the notepad. So here you go. So this is a similar approach what we have mentioned here on my MySQL workbench. You can follow this indentation so that you are clearer and you can just simply run the query. I'll use control enter and these values are entered into your table. Now I want to extract what are the values that I have entered into my table or I want to just crossverify if I have entered all the values or if the values that I have given are properly inserted or not. So for that you want to select so as we discussed there are multiple ways to extract data. You can just specify the column names from which table the table is departments or you can specify dedicated column names. Let's say I want to only extract department name or department ID. You can also do that. Or another approach for the same code is this one. You don't have to specifically mention the column names. You can just write down an asterisk and it will still execute the same. So, uh let's try all these four commands. You have your data here. And the same works for this one as well. Now, let's say I want to select only a dedicated column. So, these are your department ids and dedicated department names. This is your department name. And now if we drill down further, let's say I want to extract the details for only HR team. So this is where the wear clause comes into the picture. So extract or select department name with so this is basic fundamental queries that I'm really writing right now so that you understand how it actually works in the background. So you understand the workflow of it. So where department ID is equals to uh let's say let's run this uh department ID 4. So four is marketing. So department ID is equals to four. So what happens is SQL selects the department name column al together. The entire department column is selected. First it will go to the department's table itself. It has two columns. one is department ID and a department name. You can see it right here. Right? So this particular entire table is selected by SQL and then it reads what are the columns I need to select. So we are dedicatedly specifying just one column which is department name. This particular column will be selected in the second phase. The third phase is where it applies the filter for department ID. Now again it goes to department ID and it checks individual department numbers. So it will go for the department ID where it matches with number four and then adjacent to it is marketing. Right? This is what we are trying to extract. SQL has understood this and it will give us the marketing team name. So this is how the query works in the background. Now that we have a basic understanding of how the fundamental keywords in SQL which are select from where filtering things right basically how to create a table how to insert values inside a table and how to query them. Now we will proceed and add a few more tables onto our MySQL workbench so that we can get continued with further queries like uh some aggregate functions like average sum etc. So, so let's not waste much time. Let's go back to the query window where we have all the table details and copy them and simply write them. So, let me copy the entire uh three four five tables and paste it on the SQL workbench here. I'll minimize this a little so that we have a better view. There you go. So this is our second table which is employees table. Now before we create the table, let me explain you few things. So we have about five tables. One is departments, second is employees, third one is users, fourth one is orders and fifth one is sales. In the terms of data analytics, in the terms of business analytics, we deem these tables as two parts. The first one is fact tables and the second one is dimension tables. So what are fact tables and dimension tables? We will deep dive into these in the next upcoming modules. So basically it's nothing but relationships between the tables. So there will be one table which is related to all other tables in the database. Right? So in this particular scenario the employees table is a fact table and employee is the one which works in your company. Let's say you have an online store and you have a list of employees and these employees are the ones which receive orders from the users and they fetch your inventory pack that order and send it to the users. Right? So employee table is the fact table which is related to the orders table which is related to the users table which is related to the inventory table which is related to the department table right it connects to all the tables and on the other hand the dimension tables these are related to your fact table based on one foreign key right you'll be having employee ID right this this particular employee ID will be the primary key of your data table and somewhere or the other the employee table will dedicated immediately have a department value, department ID, right? It will have the order values, the order ID, it will have the sales ID, right? All these entries will be in the fact table and all these entries will be the primary key of all the dimension values, right? The dimension tables. These values will connect to the fact tables. So it will be a little confusing now, but when we enter into the data modeling module, there you will have a clearer understanding. For now, let's understand one thing. You just have different types of tables. One is fact table, one is dimension table. Fact table is really important because fact table acts as the mother of all the other tables and all the other tables are connected to fact table. If you delete the fact table, then there is no way you're going to perform the analytics in future, right? It is like the root. Just understand that basic thing. Now let's continue with table creation. So now let's head back to table number two which is our fact table here or let me tag it as the fact table for reference. Now the same pattern again we want to create a table. So create command table command provide a name to your table which is employee. And here we have uh 1 2 3 4 5 uh six uh columns. We have employee ID, we have employee name, we have salary, we have department ID, on which date was he or she hired and the department ID. Right? So here we are dedicatedly specifying that department ID is a foreign key which relates this particular fact table to the department's table and we are referencing this right. So references is the uh keyword which helps SQL identify that you are trying to connect this particular employee data with department data. Right? So we have about five columns here. Employee ID, name, salary, department ID and hire date. And if you are trying to get this connected with another dimension table then this particular command where it says we are trying to use department ID as a foreign key which happens to be the primary key of a dimension table which is the table name departments and in that particular table name the column name is department ID. It is named as department ID. So please go to the department's table, refer to the department ID column and then match the entries of department ID from employees table to the department table. So this is how it works. Now let's click uh the flash logo or I'll go with my shortcut control enter and we have successfully created the employees table and similar to the previous approach you need to specify the keyword insert. I want to perform an insert operation and I want to insert these elements into. In into is another keyword and you need to provide the table name which is employee. And now what are the columns I have in my table? I have employee ID, I have employee name, I have salary, I have department ID and high. So based on the column names, I need to specify the data entries as well. So you cannot mix and match. You are specifically providing the order in which the entry should be happening. So the order is first comes the employee ID, second comes the employee name, third comes the salary, fourth comes department ID and fifth is the higher data. In the same fashion your entry should also be matched. So first the employee ID is one. The name is Alice. The salary is 90,000. Department ID is two. So she belongs to department whose ID is two. Right? If we go back to department here and execute this. So we will be having engineering in the uh department ID 2. So Alice belongs to engineering department and then comes the higher date which is this one. Right? So you need to specify the data type. So here I have specifically provided the data type as date for hire date. In the same fashion rest of the employees employee 2 3 4 5 6 7 and 8 9 and 10 are added. Right? And deliberately we're also adding some null values here. So you'll understand why we are adding null values because in future we will be performing some join operations in the upcoming modules where we will try to filter out the employees whose department is not yet allocated. We are considering these employees are new or fresh hires. So they are on bench period and they are not aligned or assigned to any projects as of now. So they are having their department ID as null. So we'll be performing such operations. For now just try to uh here I think I've marked it no department right? So for now just try to create a table and add data. So now your fundamental job to do is you need to understand how to create a new schema which I've explained before. uh go to the uh schema table here create new schema and write a name to your schema and then apply it to create a new schema which happens to be a dimension table and this will be related to the fact which is our employees table right and here I'll be having user ID email of the user and at what time was the account created created at time stamp right now control enter and we have created this particular users table and similarly we will insert the data into users table. So we will be following the same pattern. So we'll be inserting into users table and these are my values. Let me indent it. So proper indentation will help you understand um how your tables are organized. So you can follow this. It might take a little time but in future it will definitely save a lot of your time entering or making mistakes. Right? So this is a good practice or best practice. Now I have about uh 10 users in my database and then this is the end of the query. So here you can see I've also tagged as duplicate email entry. So this will be uh another uh you know learning experience for us where we will try to find out duplicate email entries in our database. Now hit control enter. I think we selected employees data table. We were supposed to select users data table. Yeah. Okay. We were supposed to create the data table first. Okay. We have successfully entered the elements into the users table. Now comes our fourth table which is orders table. Similarly we have uh uh order ID, customer ID and order date. Control enter and we have created the orders table. Let's quickly uh add all the data into the orders table. You can also follow the same indentation or if in case if you want to have uh a particular uh u you know specific format of indentation, you can also follow that. You have the last table which is sales table. And similarly let's enter all the data into sales table. Now let's check all the entries or all the tables. The process is simple like we discussed. Select star from employees. There you go. So these are the employees and their details. And similarly you can just quickly copy and paste this command and rename this to departments and run a query and you have all the employees or department details. Similarly, you can copy paste and then you can use the name of uh sales orders and users users and I'll also have orders and also I'll have sales. So these are the user details that we have entered and these are the timestamps when a user account was created and these are the order details. So these are the orders placed on what detail on what date and who was the customer and who was the order ID and all the details of that and sales data table what was the sales ID on what date was the sale made and what's the amount they paid right so these are the details that we needed now let's take a step further and try to uh extract some details from this particular data set that we have just created so I'd like to close it here. So far this is the creation and insert process. Let's comment it. Now let's proceed further and this would be the querying stage. Now let's try the filtering process. So uh let's consider we want to filter the details of employees who are earning um let's say 90,000 or more. So how do you extract it? Let's take a moment. So far we have a basic understanding of how to insert data, how to select queries, right? And we also uh went through a sample where statement where we extracted the marketing ID, right? So the department name where uh marketing or department ID was equals to two right. So following the same approach can you devise a quick query? Yes I think you already have a graph template on your mind but it's okay if you don't have it. So let's get started with it. So as we discussed before SQL is really simple. All you need to do is just explain SQL in very simple terms. I want to select select what I want to select. Uh I want to select employee name or I want to select everything from employee where from employee let me copy the employee name to save time. This is the table name from employees where salary is greater than uh a rough number 90,000. So before that let's run this query and see we have um Alice, we have uh Bob, we have David, we have Eve, we have uh Heidi and uh we have Yeah. So there are a few employees who are drawing salary uh greater than uh 90,000. Let's say it has greater than or equal to 90,000. So we must be getting a couple of entries here. So let's quickly run the command control enter and there you go. So we have about 1 2 3 4 five employees Bob Alice David even Heidi who are uh withdrawing salary which is greater than or equal to 90,000. So this is one of the good filtering examples. Now let's go with a few other uh queries or filtering queries. So we have HR, we have employees, we have users, we have sales, we have orders. So let's say I want to extract employees who were recruited after February of 2025. So for that we can use the same query. we can quickly copy and paste it here. prime employees where uh join date right so I'll execute the select query once again so I'll copy this particular field name and paste it here is greater than or equal to uh March we don't have a March but we can take the September we can uh copy this particular field and paste it here. There you go. So, any employee who is hired after September 2025 should be highlighted. Enter. And there you go. We have about a couple of employees who were recruited after this particular date. Or you can also find out less than who are the employees who were recruited before this particular date. There you go. So only David was the one who was maybe this can be considered as David is one of the senior most employees in this particular organization. Now let's proceed further and try the next type of query which is the sorting data. Now I want to sort the uh employees table. Let's say uh now I I want to identify uh employees in terms of salary. Who is the employee who is drawing highest salary and who is the employee who is drawing the least salary? I want to order them in decreasing order. So it's really simple. You can use the same query here. Select star from employees and order by salary d. So we have u two uh keywords d and ac. So AC is ascending order. B is descending order.
Original Description
🔥IIT Delhi - Data Analytics, Generative AI And Adaptive System - https://www.simplilearn.com/ihfc-iitd-data-analytics-genai-course?utm_campaign=dtOCwqDUF1w&utm_medium=Lives&utm_source=Youtube
🔥Data Analyst Masters Program (Discount Code - YTBE15) - https://www.simplilearn.com/data-analyst-masters-certification-training-course?utm_campaign=dtOCwqDUF1w&utm_medium=Lives&utm_source=Youtube
🔥IITK - Professional Certificate Course in Data Analytics and Generative AI (India Only) - https://www.simplilearn.com/iitk-professional-certificate-course-data-analytics?utm_campaign=dtOCwqDUF1w&utm_medium=Lives&utm_source=Youtube
🔥IIT Kanpur - Professional Certificate Course in Data Analytics and Generative AI - https://www.simplilearn.com/iitg-generative-ai-data-analytics-program?utm_campaign=dtOCwqDUF1w&utm_medium=Lives&utm_source=Youtube
🔥Microsoft PowerBI Certification (PL-300) - https://www.simplilearn.com/power-bi-certification-training-course?utm_campaign=dtOCwqDUF1w&utm_medium=Lives&utm_source=youtube
This video on SQL Full Course 2026 by Simplilearn, is a free and complete beginner-friendly tutorial designed to help you learn SQL from scratch and build strong database fundamentals. This course explains how databases work and teaches you to write SQL queries to retrieve, insert, update, and manage data efficiently. You’ll learn essential concepts like tables, keys, joins, functions, and aggregations using real-world examples. The tutorial also covers SQL for data analysis and reporting, making it useful for analysts, developers, and beginners. By the end of this full SQL course 2026, you’ll be confident in working with databases and preparing for SQL interviews and certifications.
Related Videos:
✅ 1. Power BI Full Course 2026 - https://youtu.be/husZ6Noq7e0
✅ 2. SQL Full Course 2026 - https://youtu.be/crZIWsWy4fs
✅ 3. Advanced Excel Full Course 2026 - https://youtu.be/I-Dw4G3XAAQ
✅ 4. Tableau Full Course 2026 - https://youtu.be/bVtB9JEKGu0
✅ 5. Excel Lookup Tutorial
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Simplilearn · Simplilearn · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Ethical Hacking Full Course 2026 | Ethical Hacking Course for Beginners | Simplilearn
Simplilearn
AWS Full Course 2026 | AWS Cloud Computing Tutorial for Beginners | AWS Training | Simplilearn
Simplilearn
Data Structures And Algorithms Full Course | Data Structures and Algorithms Tutorial | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
Microsoft Azure Full Course 2026 | Azure Tutorial for Beginners | Azure Training | Simplilearn
Simplilearn
Shopify Tutorial For Beginners 2026 | Shopify Course | shopify dropshipping | Simplilearn
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
🔥Feeling Stuck? How Upskilling Can Boost Your Career! #shorts #simplilearn
Simplilearn
Growth Hacking In Marketing | Learn Growth Hacking Marketing Strategies | Simplilearn
Simplilearn
🔥Cracked 3 Job Offers with One AIML Course! | 20–30% Salary Hike #shorts #simplilearn
Simplilearn
Top 10 Must-Have Figma Plugins for UI/UX Designers in 2026 | Figma Plugins | Simplilearn
Simplilearn
Business Analytics Full Course 2026 | Business Analytics Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Getting future-ready with course in Artificial Intelligence | Roopam’s story
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | How David Went From Seasoned Engineer to AI Innovator #GetCertifiedGetAhead
Simplilearn
Complete Social Media Marketing Strategy for 2026 | Social Media Marketing Strategy | Simplilearn
Simplilearn
🔥Top 4 Cybersecurity Certifications You Need! #simplilearn #shorts
Simplilearn
🔥Cloud Engineer Salary in India 2026 | City-Wise Breakdown #shorts #simplilearn
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
Full Stack Java Developer Course | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Social Media Marketing Full Course | Social Media Marketing Tutorial For Beginners | Simplilearn
Simplilearn
How To Create LLM Chatbot Demo 2026 | Build a LLM Chatbot From Scratch | Simplilearn
Simplilearn
Digital Supply Chain Management Certification | Supply Chain Management Course | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Integrating AI & Music | Diego's Story
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
SEO Full Course 2026 | SEO Tutorial for Beginners | SEO Training | SEO Explained | Simplilearn
Simplilearn
PMP Vs CAPM: Which Certification Should You Choose? | PMP Vs CAPM | Simplilearn
Simplilearn
Complete Data Analyst Roadmap 2026 | How To Become A Data Analayst In 2026 | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
🔥5 Jobs That Are Most Likely Safe from Layoffs in Today’s Market #shorts #simplilearn
Simplilearn
🔥Git vs GitHub – What's the Difference?
Simplilearn
What Goes Behind Building the Likes of Uber and Netflix? | Product Management Tutorial | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Product Life Cycle 2025 | Stages Of Product Life Cycle | Product Life Cycle Tutorial | Simplilearn
Simplilearn
Project Management Full Course 2026 | Project Management Tutorial | PMP Course | Simplilearn
Simplilearn
PCB Design Course 2025 | PCB Designing Explained | How To Make PCBs | Simplilearn
Simplilearn
Python Full Course 2026 | Python Data Analytics Tutorial For Beginners | Simplilearn
Simplilearn
🔥Top Product Management Skills You Need to Succeed in 2026 #shorts #simplilearn
Simplilearn
SQL For Data Analytics 2026 | Essential SQL Commands | SQL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Paving Way To Success With AI & ML Course | Soumik’s Upskilling Journey
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Learn Snowflake In 45 Mins | Snowflake Tutorial | What Is Snowflake | Snowflake Explained
Simplilearn
🔥ML Career Tip – How to Start Learning Machine Learning in 60 Seconds! #shorts#simplilearn
Simplilearn
🔥Agile vs Waterfall in 60 Seconds #shorts #simplilearn
Simplilearn
Excel Full Course 2026 | Excel Tutorial For Beginners | Microsoft Excel Course | Simplilearn
Simplilearn
What Are AI Agents? | Types Of AI Agents | AI Agents Explained | AI Agents Tutorial | Simplilearn
Simplilearn
How To Create a Product Roadmap In 2026 | Product Roadmap | What Is Product Roadmap | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
🔥What Is Phishing? #shorts #simplilearn
Simplilearn
Cloud Computing Full Course 2026 | Cloud Computing Tutorial | Cloud Computing Course | Simplilearn
Simplilearn
Simplilearn Reviews | Overcoming Rejection & career plateau to finding a New Job : Bhaskar Banerji
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
VLSI Design Course 2026 | VLSI Tutorial For Beginners | VLSI Physical Design | Simplilearn
Simplilearn
More on: SQL Analytics
View skill →Related AI Lessons
🎓
Tutor Explanation
DeepCamp AI