
“This is my Schema
CREATE TABLE customers (
  customer_id INT PRIMARY KEY,
  customer_name VARCHAR(50),
  address VARCHAR(100),
  city VARCHAR(50),
  state VARCHAR(50),
  zip_code VARCHAR(10)
);
CREATE TABLE orders (
  order_id INT PRIMARY KEY,
  order_date DATE,
  customer_id INT,
  order_total DECIMAL(10,2),
  FOREIGN KEY (customer_id) REFERENCES customers (customer_id)
);
 
CREATE TABLE order_details (
  order_id INT,
  product_name VARCHAR(50),
  quantity INT,
  price DECIMAL(10,2),
  PRIMARY KEY (order_id, product_name),
  FOREIGN KEY (order_id) REFERENCES orders (order_id)
);
 
Write a SQL statement that retrieves the customer name,
order date, product name, and quantity for all orders
where the order total is greater than $1,000 and
the product name contains the word "chair"