List:General Discussion« Previous MessageNext Message »
From:Jim Faucette Date:May 30 1999 3:26am
Subject:Re: Multiple counts as an array
View as plain text  
Darren Sweeney wrote:
> 
> Hi again Jim,
> 
> Yes, I thought of that but that does not return a 0 if there is no item with
> that category ... e.g. I have a full listing on a page, I need a user to see
> if there are no pc_digital_camera for example ... the GROUP BY would only
> return them if they were there ...
> 

Oops, here's what I was after:
SELECT t2.num, count(t1.num) FROM t2 LEFT JOIN t1 USING (num) 
GROUP BY t2.num;

You can substitute description for num.

  jim...
Thread
Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayAlexander I. Barkov30 May
    • LIKE or = ?Stefan Schmiedl31 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayGraham Ashton30 May
Re: Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
Re: Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arraySasha Pachev30 May