Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
SELECTing certain columns | Selecting
SQL Basics
course content

Зміст курсу

SQL Basics

SQL Basics

1. Selecting
2. Filtering
3. Aggregating
4. Sorting
5. Grouping
6. Practicing

SELECTing certain columns

Let's dig into our database. This database has 9 columns:

  1. model - model of the car
  2. year - year of manufacture
  3. price - car price in Euros
  4. transmission - type of gearbox
  5. mileage - miles drove
  6. fueltype - engine fuel type
  7. tax - road tax
  8. mpg - miles per gallon
  9. enginesize - engine size in liters.

To extract certain columns you need to select them by their names, like:

12
SELECT column1, column2, column3 FROM table_name
copy

Please note, that SQL is also case-insensitive to column names, i.e. if the column has name id both notations id and ID will be interpreted the same.

Завдання

Extract columns model, year, and price from the audi_cars database.

Завдання

Extract columns model, year, and price from the audi_cars database.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 2
toggle bottom row

SELECTing certain columns

Let's dig into our database. This database has 9 columns:

  1. model - model of the car
  2. year - year of manufacture
  3. price - car price in Euros
  4. transmission - type of gearbox
  5. mileage - miles drove
  6. fueltype - engine fuel type
  7. tax - road tax
  8. mpg - miles per gallon
  9. enginesize - engine size in liters.

To extract certain columns you need to select them by their names, like:

12
SELECT column1, column2, column3 FROM table_name
copy

Please note, that SQL is also case-insensitive to column names, i.e. if the column has name id both notations id and ID will be interpreted the same.

Завдання

Extract columns model, year, and price from the audi_cars database.

Завдання

Extract columns model, year, and price from the audi_cars database.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 2
toggle bottom row

SELECTing certain columns

Let's dig into our database. This database has 9 columns:

  1. model - model of the car
  2. year - year of manufacture
  3. price - car price in Euros
  4. transmission - type of gearbox
  5. mileage - miles drove
  6. fueltype - engine fuel type
  7. tax - road tax
  8. mpg - miles per gallon
  9. enginesize - engine size in liters.

To extract certain columns you need to select them by their names, like:

12
SELECT column1, column2, column3 FROM table_name
copy

Please note, that SQL is also case-insensitive to column names, i.e. if the column has name id both notations id and ID will be interpreted the same.

Завдання

Extract columns model, year, and price from the audi_cars database.

Завдання

Extract columns model, year, and price from the audi_cars database.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Let's dig into our database. This database has 9 columns:

  1. model - model of the car
  2. year - year of manufacture
  3. price - car price in Euros
  4. transmission - type of gearbox
  5. mileage - miles drove
  6. fueltype - engine fuel type
  7. tax - road tax
  8. mpg - miles per gallon
  9. enginesize - engine size in liters.

To extract certain columns you need to select them by their names, like:

12
SELECT column1, column2, column3 FROM table_name
copy

Please note, that SQL is also case-insensitive to column names, i.e. if the column has name id both notations id and ID will be interpreted the same.

Завдання

Extract columns model, year, and price from the audi_cars database.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 2
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt