List:General Discussion« Previous MessageNext Message »
From:Keith C. Ivey Date:May 13 2003 10:40pm
Subject:Re: count()
View as plain text  
On 13 May 2003 at 15:36, Eric Anderson wrote:

> and you want to get a total of each the entries, is there any way to do
> it in one pass, as opposed to:
> 
> select count(*) from <table> where status='pending'
> select count(*) from <table> where status='active'

SELECT status, COUNT(*) FROM table_name GROUP BY status
-- 
Keith C. Ivey <keith@stripped>
Tobacco Documents Online
http://tobaccodocuments.org

Thread
count()Eric Anderson14 May
  • Re: count()Jeff Shapiro14 May
  • Re: count()Dan Nelson14 May
  • Re: count()Paul DuBois14 May
  • RE: count()Jennifer Goodie14 May
  • Re: count()Keith C. Ivey14 May
  • Re: count()(Pete Harlan)14 May
  • Re: count()Matt Silva15 May
Re: count()Steve Edberg14 May
  • Re: count()CR14 May
Re: count()Steve Edberg14 May
RE: count()Eric Anderson14 May
RE: count()Mike Hillyer14 May