Lecture 6 - Advanced SQL
Lecture 6 - Advanced SQL
ADVANCED SQL
An INNER join will only return rows from each table that have
matching rows in the other.
Unlike
INNER join,
this will
include
customer
rows with
no
matching
order rows
From Chapter 2
Unary
1:N
Join version
Subquery version
Note: Only
the orders
that involve
products with
Natural Ash
will be
included in
the final
results.
First query
Combine
Second query
be very complex.
Sometimes it’s useful to combine
literals
Write simple queries
simple parts
Don’t nest one query inside another query