var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
i was trying to write query but could't figure out how should I join the third
table and get a count from that table?
Q-List for each trip, the trip code, the holiday code, the holiday name, and how many staff members are assigned to the trip
I used a NATURAL JOIN to join tables trips and holidays but i need to get a count from another table. I tried different thinks but no luck.
SELECT trip_code, holiday_code, holiday_name
FROM trips natural JOIN holidays;
can anyone help with this?
piece of advice: ~never~ use NATURAL joins
as for the rest of the homework assignment, go back to your course notes and look up COUNT() and GROUP BY
I have been looking at my course notes but I could't see any example like what i need. This is a online course so I don't get too much help from my teacher either. mostly self study.
Originally Posted by r937
So are you saying I don't need to join the tables here?
no, i'm saying don't use NATURAL join, use INNER
Originally Posted by arayici
and as long as you're studying online, there are aproximately 937,000,000 SQL tutorials out there which will teach you COUNT() and GROUP BY