Ok, well for #2 on that page..
you basically want to join the REP and CUSTOMER tables on the REP_NUM column, and also CUSTOMER.CREDIT_LIMIT = '$10,000.00'. Then just add in the DISTINCT keyword in the select statement to only retrieve each REP once.
Thank you Ian. Every bit helps.
So, it'd be...
SELECT DISTINCT(REP_NUM, LAST_NAME, FIRST_NAME)
FROM REP
WHERE REP.REP_NUM = CUSTOMER.REP_NUM
AND CUSTOMER.CREDIT_LIMIT = '$10,000'
?
looks pretty good to me.
or you could do an inner join.
how would you write that?
well.. a select with a WHERE clause that matches two columns from different tables IS an INNER JOIN (by definition).
you can use the following syntax if you like.
SELECT DISTINCT(REP_NUM, LAST_NAME, FIRST_NAME)
FROM REP INNER JOIN CUSTOMER
ON REP.REP_NUM = CUSTOMER.REP_NUM
WHERE CUSTOMER.CREDIT_LIMIT = '$10,000'
hehehe... just being difficult.