~/ learn/ postgresql/ cards/ Joining three tables
1 of 2

For order 1, list each book title and quantity ordered. Columns: title, quantity.

For order 1, list each book title and quantity ordered. Columns: title, quantity.

Answer

SELECT b.title, oi.quantity FROM order_items oi JOIN books b ON b.id = oi.book_id WHERE oi.order_id = 1;

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/0e49a667-5da4-4607-b77c-d364578918bc/flashcard utf-8 LF