monkeymafia
March 21st, 2007, 09:23 AM
Hi having a little trouble with a sql query. am trying to find the total number of passengers on each cruise. any helpers or pointers would be greatly appreciated.
i have a customer booking table which is made up of 2 foreign keys: customer ID and voyage ID
if i do:
select count (distinct voyage_ID) from booking
it obviously gives me the number of different voyages. but how would i calculate the number of customers on each of these voyages?
I am using Oracle
i have a customer booking table which is made up of 2 foreign keys: customer ID and voyage ID
if i do:
select count (distinct voyage_ID) from booking
it obviously gives me the number of different voyages. but how would i calculate the number of customers on each of these voyages?
I am using Oracle