How to display data from multiple tables in SQL
database, join, sql
Solution
You need a `JOIN`
SELECT customer_id, cust_first_name, order_id, order_item_id, product_name
FROM demo_customers
INNER JOIN demo_orders on demo_orders.customer_id = demo_customers.customer_id
WHERE cust_state= 'VA'
Problem
I'm relatively new to SQL. I'm trying to figure out how to satisfy this condition: Display `customer_id, customer_last_name, order_id,order_item_id, product_name` for any customer living in Virginia. So far, I have this, but I'm not sure how to display the values together. Any help will be appreciated. ``` SELECT customer_id, cust_first_name FROM demo_customers WHERE cust_state= 'VA' SELECT order_id FROM demo_orders WHERE customer_id= '1' ```