SQL Basics
Menu
Querying Data
Menu
Filtering Data
Menu
Joining Tables
Menu
SQL Functions
Menu
Modifying Data
Menu
Defining Data
Menu
SELECT Statement
SQL statement/Query/Command is used to perform tasks such as retrieve data or update data on databases.
The script in our example is SELECT Statement, other call it Query or SELECT command.
.
The most important SQL commands/statements are:
- SELECT – the first thing you’ll do, you choose the columns you want to be retrieved from the database.
- FROM – as next you need to specify at least one table where your data is stored.
- JOIN – if your data is stored in several tables, then you can join the two or more tables in one SQL statement.
- WHERE – is used to filter rows, returning only those that meet specified conditions.
- GROUP BY – It is an aggregation function to group rows together by common column value.
- HAVING – it is similar to WHERE but it works together with GROUP BY to filter the aggregated values.
- ORDER BY – is used to display the result in a specific order.
- LIMIT – is used to restrict how many rows are returned. In our example, it limits the result to the top two rows.
.
Baraa Khatib Salkini
I am senior IT solution architect with 10 years of experience working in top projects in top companies in Germany. I will share my experience by creating tutorials about data, Data Analytics, Data Engineering, Data Modelling, Data Visualization, Data Mining and A.I.
All Posts