title: Query Optimization in SQL in given case
body: <p>These are the given tables:</p>
  <pre class="lang-sql prettyprint-override"><code>create table products 
  (productID int not null auto_increment,
   Name varchar(30),
   Price float ,
   CoffeOrigin varchar(30),
   primary key (productID));
  
  create table customers
  (customerID int not null auto_increment,
  First_Name varchar(30),
   Last_Name varchar(30),
   Gender varchar(2) not null CHECK (Gender IN ('M', 'F')),
   ContactNumber bigint,
  primary key (customerID));
  
  create table orders
  (orderID int not null auto_increment,
  productID int,
  customerID int,
  Date_Time datetime,
  primary key(orderID),
  foreign key(customerID) references customers(customerID),
  foreign key(productID) references products(productID));
  </code></pre>
  <p>Question is:</p>
  <blockquote>
  <p>Write a optimized query to find out the name of all the customerIDs who ordered
  coffee that originated from ‘Costa Rica’ or ‘Indonesia’.</p>
  </blockquote>
  <p>My attempt:</p>
  <pre><code>select customers.customerID, first_name, last_name from customers where customerID in
  (select customerID from orders where productid in
  (select productid from products where coffeorigin = &quot;costa rica&quot; or &quot;indonesia&quot;));
  </code></pre>
  <p>My teacher says it can be optimized more but I don't see any way. Please Help me out.</p>