This is the challeng for my class. Using INNER JOIN retrieve the following information:
- Using the customers and orders table find all the orders that were created by an owner of a company.
I came up with this but when I enter it it says empty set>>>
SELECT id FROM orders INNER JOIN customers USING (id);
These are the columns from the customers table. CUSTOMERS
| id | company | last_name | first_name | email_address | job_title
| business_phone | home_phone | mobile_phone | fax_number | address
| city | state_province | zip_postal_code | country_region | web_page
| notes | attachments |.
These are the columns from the orders table. ORDERS
| id | employee_id | customer_id | order_date | shipped_date | shipper_id
| ship_name | ship_address | ship_city | ship_state_province
| ship_zip_postal_code | ship_country_region | shipping_fee | taxes
| payment_type | paid_date | notes | tax_rate | tax_status_id | status_id