Tag Archives: SELECT and WHERE in SQL

Select and filter the result with WHERE in SQL

004 – MySQL / SQL – SELECT and filter the result with WHERE clause

The following two exercises where given in the classroom as challenges during my time at Code Institute Dublin.

Challenge 1

The first challenge says:

Select the 'Name' column from the 'MediaType' table.


MPEG audio file
Protected AAC audio file
Protected MPEG-4 video file
Purchased AAC audio file
AAC audio file

Before doing anything we have to get to the Chinook database. As we did before, the following commands are necessary:

Start MySQL:

service mysql start

Connect to MySQL:

mysql -u root -p

Use Chinook database:

use Chinook

Continue reading