It is a new day to learn SQL commands that will help you in your data science career. You will use SQL query to extract, save, and modify the database to your requirements.
So, what is stopping you from learning the most used command for extracting the data and performing a quick analysis on a SQL database?
In this post, we will learn essential SQL commands with code examples using Online SQL Editor. It allows users to run online queries without any issues. The platform comes with an editor and 3 SQL tables for practice. The database consists of three tables: Customers, Orders, and Shippings.
The SELECT command allows us to extract the selective or all columns from the table. It is the basic building block of SQL queries.
In our case, we are displaying all of the columns using `*` from the Customer table.
In the second example, we are displaying only three columns from the Customers table. You can type column names separated by commas “,” and end it with FROM command and the table name.
The DISTINCT is used to display unique values from the column. Instead of showing two Johns, it is now showing one John.
The WHERE command is used for conditional and filtering. We will be filtering the table to show customers with age greater than 25. Apart from greater than you can also use lesser than