List:General Discussion« Previous MessageNext Message »
From:Brian Dunning Date:November 2 2009 5:06pm
Subject:Re: Trouble joining 3 tables
View as plain text  
Thanks, this solved it!

On Nov 2, 2009, at 12:37 AM, Michael Dykman wrote:

> I suspect 'distinct' might help you out here.
>
> SELECT
>       people.*,
>       count(distinct cars.car_id) as car_count,
>       count(distinct pets.pet_id) as pet_count
>
Thread
Trouble joining 3 tablesBrian Dunning2 Nov
  • Re: Trouble joining 3 tablesJohnny Withers2 Nov
    • Re: Trouble joining 3 tablesBrian Dunning2 Nov
      • Re: Trouble joining 3 tablesJohnny Withers2 Nov
        • Re: Trouble joining 3 tablesBrian Dunning3 Nov
Re: Trouble joining 3 tablesBrian Dunning2 Nov