I’m having a few problems creating a SQL Query.
I have the following tables:
**Tour**
tourID
tourName
**Schedule**
scheduleID
tourID
**Ticket**
scheduleID
customerID
And what I want to select is the tourname 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.
Number of tickets per schedule:
SELECT t.scheduleID, COUNT(t.scheduleID) AS numTickets
FROM Ticket t
GROUP BY t.scheduleID
Appreciate the help
Try this: