In order to start learning SQL, we first need to understand what a database is.
A database (DB) is an ordered set of logically interrelated data that is shared and stored in one place. In short, the simplest database is an ordinary table with rows and columns that stores various types of information (the table in Excel can serve as an example).
Also, database management systems (DBMS), which provide functionality for working with the database, are often inextricably linked with the database. The SQL language is precisely the part of the DBMS that manages information in the database. We will consider a database as a set of ordinary tables stored in separate files.
So, let's move on to SQL.
SQL is a simple programming language that has few commands and can be learned by anyone. Stands for Structured Query Language - a language of structured queries that was developed to work with a database, namely to receive/add/change data, to be able to process large arrays of information and quickly receive structured and grouped information.
There are many variations of the SQL language (called "dialects"), but they all have almost the same basic commands.
There are also many DBMSs, but the main ones are:
To work with SQL code, we will need one of the DBMS listed above. For training, we will use the DBMS Microsoft Access.
SQL, like other programming languages, has its own commands (statements), which are used to give instructions for data selection.
To consider how SQL statements work, we will use an imaginary database with information about the products sold: