title: Filtering based on Joining Multiple Tables in SQL
body: <p>I am using MySQL and I have three table:</p>
  
  <pre><code>Table: Salesperson
  ID | Name | Age | Salary
  1  | Abe  | 61  | 140000
  2  | Bob  | 34  | 44000
  5  | Chris| 34  | 40000
  7  | Dan  | 41  | 52000
  8  | Ken  | 57  | 115000
  11 | Joe  | 38  | 38000
  
  Table: Customer
  ID | Name     | City     | Industry_Type
  4  | Samsonic | pleasant | J
  6  | Panasung | oaktown  | J
  7  | Samony   | jackson  | B
  9  | Orange   | jackson  | B
  
  Table: Orders
  Number | order_date | cust_id | salesperson_id | Amount
  10     | 1996-08-02 | 4       | 2              |540 
  20     | 1999-01-30 | 4       | 8              |1800
  30     | 1995-07-14 | 9       | 1              |460
  40     | 1998-01-29 | 7       | 2              |2400
  50     | 1998-02-03 | 6       | 7              |600
  60     | 1998-03-02 | 6       | 7              |720
  70     | 1995-05-06 | 9       | 7              |150
  </code></pre>
  
  <p>I want to find the names of all salespeople that do not have any orders with Samsonic and who have made at least 1 order</p>
  
  <p>My expected Result is:</p>
  
  <pre><code>Name
  Abe
  Dan
  </code></pre>
  
  <p>I tried:</p>
  
  <pre><code>SELECT Distinct(s.name)
  FROM Orders o 
  INNER JOIN Salesperson s
  ON o.salesperson_id = s.ID
  INNER JOIN Customer c
  ON c.ID = o.cust_id
  WHERE s.name NOT IN(
  select s.name where c.name='Samsonic'
  );
  </code></pre>
  
  <p>However the result I get is:</p>
  
  <pre><code>Name
  Dan
  Bob
  Abe
  </code></pre>
  
  <p>I believe Bob shows up since he made another order that was not Samsonic. How can I get my intended result while still joining all three tables? Thanks!</p>