Introduction
Exercises with artist, museums and their pieces of art
Exercises with the band members table
Exercises with tables of Japanese 100 Yen store
Exercises with employees, salaries and benefits

Instruction

And here's our final table in this set.

Exercise

Select all data from the order_items table.

This is an associative table – it connects data from two tables: orders and products. That's how we know what items form an order.

It consists of the following columns:

  • id – the id of a given pair,
  • order_id – the id of the order a given product is part of,
  • product_id – the id of the product itself,
  • quantity – the quantity of a given product,
  • price – the price of given product times quantity.

Console

Code editor

Result

TableConsole