sql - Distinct doesn't work -


the below code gives wrong result. using distinct command type appears 2 times on results.

select distinct      concert.concert_id, concert.c_type,       count(bookings.customer_customer_id) number_of_customers      concert, customer, event, bookings      customer.customer_id =  bookings.customer_customer_id     , event.event_id =  bookings.event_event_id     , concert.concert_id =  event.concert_id group      concert.concert_id, concert.c_type order      concert.concert_id desc; 

results:

enter image description here

distinct means row whole should not duplicated, in case type appears twice difference concert_id , number_of_customers.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -