title: MySQL query over 3 tables
body: <p>I'm having a few problems creating a SQL Query.</p>
  
  <p>I have the following tables: </p>
  
  <pre><code>**Tour**
  tourID
  tourName
  
  **Schedule**
  scheduleID
  tourID
  
  **Ticket**
  scheduleID
  customerID
  </code></pre>
  
  <p>And what I want to select is the <code>tourname</code> and the number of tickets sold per tour. I know how to select the number of tickets sold by schedule but I'm stuck getting it linked to the tour.</p>
  
  <p>Number of tickets per schedule:</p>
  
  <pre><code>SELECT t.scheduleID, COUNT(t.scheduleID) AS numTickets
  FROM Ticket t
  GROUP BY t.scheduleID
  </code></pre>
  
  <p>Appreciate the help</p>