34. Left Outer Join Bookstore2 SQL212 Module 2 Basic SQL 92 Syntax: Select <column-list> From <table1> Left [outer] join <table2> On <join condition>
35.
36. Left-Join Bookstore2 SQL212 Module 2 Basic Example: SELECT customer_first_name, customer_street, order_numb, order_date from customers as c left join orders as o on c.customer_numb = o.customer_numb
42. Uncorrelated Subquery Bookstore2 SQL212 Module 2 select isbn, quantity from orderlines ol where ol.order_numb in (select o.order_numb from orders o where order_date between ‘1-JAN-99’ and ’31-DEC-99’)
45. Negative Subquery Bookstore2 SQL212 Module 2 select isbn, quantity from orderlines ol where ol.order_numb not in (select o.order_numb from orders o where order_date between ‘1-JAN-99’ and 31-DEC-99’)
48. Correlated subquery with Exists Bookstore2 SQL212 Module 2 SELECT isbn, quantity FROM orderlines AS ol WHERE exists (select * from orders o where ol.order_numb = o.order_numb and o.order_date between ‘1-JAN-99’ and ‘31-DEC-99’); This type of query covered in intermediate SQL class
49.
50. Unions Bookstore2 SQL212 Module 2 Select <column-list> from <table1> Union [ALL] Select <same-columns> from <table2>
64. Aggregate Functions Bookstore2 SQL212 Module 2 Basic syntax: Select <function>(<column>) From <table> Group by <column-list> Having <predicate> Group by all columns to left of one(s) you want to aggregate
65. Aggregate Functions Bookstore2 SQL212 Module 2 SELECT orderlines.order_numb, Count(*) AS “Number of Order Lines” , Sum(orderlines.quantity) AS SumOfquantity, Sum(quantity * cost_each) AS extension FROM orderlines GROUP BY orderlines.order_numb having count(*) > 1