Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Select the Songs! | Database & Introduction to Syntax
SQL Tutorial for Beginners
course content

Course Content

SQL Tutorial for Beginners

SQL Tutorial for Beginners

1. Database & Introduction to Syntax
2. SQL Aggregate Functions
3. Filtering Statements

bookSelect the Songs!

Database

Of course, we will work with some database, and it will be Music Database. Below you can see a single table songs with records in it:

It contains info:

id - the unique id for the record

title - the name of the song

singer - song's band or singer

album - song's album

price - the price of this record

year - the year of the release.

In this course, we will work only with the songs table, so explore and remember which columns it contains. In the advanced course, we'll extend the database with more tables and connections between them.

Each table has a unique name. Each column has a unique name inside the table, but columns from different tables can have the same namings.

Let's start with the very first command SELECT. This simple command lets you retrieve some data from table.

1
SELECT * FROM songs
copy

Here * means all records with all fields, and songs is the table we extract the records from. As a result, you'll get all data stored in songs.

Remember that your code can contain only one SELECT statement.

Task

Retrieve all data from the table songs.

SQL is not case-sensitive, so you can write select or Select. Same about other commands, table and column names. Records inside the tables are case-sensitive: you cannot write abba or Abba for ABBA value. We'll use the upper-case notation for a better demonstration.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the <span style='color:red'>Internal Server Error</span> as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
toggle bottom row

bookSelect the Songs!

Database

Of course, we will work with some database, and it will be Music Database. Below you can see a single table songs with records in it:

It contains info:

id - the unique id for the record

title - the name of the song

singer - song's band or singer

album - song's album

price - the price of this record

year - the year of the release.

In this course, we will work only with the songs table, so explore and remember which columns it contains. In the advanced course, we'll extend the database with more tables and connections between them.

Each table has a unique name. Each column has a unique name inside the table, but columns from different tables can have the same namings.

Let's start with the very first command SELECT. This simple command lets you retrieve some data from table.

1
SELECT * FROM songs
copy

Here * means all records with all fields, and songs is the table we extract the records from. As a result, you'll get all data stored in songs.

Remember that your code can contain only one SELECT statement.

Task

Retrieve all data from the table songs.

SQL is not case-sensitive, so you can write select or Select. Same about other commands, table and column names. Records inside the tables are case-sensitive: you cannot write abba or Abba for ABBA value. We'll use the upper-case notation for a better demonstration.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the <span style='color:red'>Internal Server Error</span> as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
toggle bottom row

bookSelect the Songs!

Database

Of course, we will work with some database, and it will be Music Database. Below you can see a single table songs with records in it:

It contains info:

id - the unique id for the record

title - the name of the song

singer - song's band or singer

album - song's album

price - the price of this record

year - the year of the release.

In this course, we will work only with the songs table, so explore and remember which columns it contains. In the advanced course, we'll extend the database with more tables and connections between them.

Each table has a unique name. Each column has a unique name inside the table, but columns from different tables can have the same namings.

Let's start with the very first command SELECT. This simple command lets you retrieve some data from table.

1
SELECT * FROM songs
copy

Here * means all records with all fields, and songs is the table we extract the records from. As a result, you'll get all data stored in songs.

Remember that your code can contain only one SELECT statement.

Task

Retrieve all data from the table songs.

SQL is not case-sensitive, so you can write select or Select. Same about other commands, table and column names. Records inside the tables are case-sensitive: you cannot write abba or Abba for ABBA value. We'll use the upper-case notation for a better demonstration.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the <span style='color:red'>Internal Server Error</span> as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Database

Of course, we will work with some database, and it will be Music Database. Below you can see a single table songs with records in it:

It contains info:

id - the unique id for the record

title - the name of the song

singer - song's band or singer

album - song's album

price - the price of this record

year - the year of the release.

In this course, we will work only with the songs table, so explore and remember which columns it contains. In the advanced course, we'll extend the database with more tables and connections between them.

Each table has a unique name. Each column has a unique name inside the table, but columns from different tables can have the same namings.

Let's start with the very first command SELECT. This simple command lets you retrieve some data from table.

1
SELECT * FROM songs
copy

Here * means all records with all fields, and songs is the table we extract the records from. As a result, you'll get all data stored in songs.

Remember that your code can contain only one SELECT statement.

Task

Retrieve all data from the table songs.

SQL is not case-sensitive, so you can write select or Select. Same about other commands, table and column names. Records inside the tables are case-sensitive: you cannot write abba or Abba for ABBA value. We'll use the upper-case notation for a better demonstration.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the <span style='color:red'>Internal Server Error</span> as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 2
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt