Sorry for the bother, but I'm not sure where to send problems related to
the MySQL list. I can receive emails from the list, but my emails to the
list do not seem to be making it. I can also not get a response to
unsubscribe or subscribe or any other admin address I've tried.
Have either of you heard of any recent issues with the list - and did this
message actually make it to the list?
Thanks for your time.
C.R.
----- Original Message -----
From: "Steve Edberg" <sbedberg@stripped>
To: "Eric Anderson" <keric@stripped>; <mysql@stripped>
Sent: Tuesday, May 13, 2003 7:08 PM
Subject: Re: count()
> Unless I'm having thinking problems as well,
>
> select status, count(*) group by status
>
> should work.
>
> steve
>
>
> At 03:36 PM 5/13/03, Eric Anderson wrote:
>
> >I'm not sure if I'm just having problems thinking today but if you've
> >got a field:
> >
> >status enum('pending','active','cancelled') NOT NULL default 'pending'
> >
> >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'
> >...
> >
> >mysql,sql
>
> +------------------------------------------------------------------------+
> | Steve Edberg sbedberg@stripped |
> | Database/Programming/SysAdmin (530)754-9127 |
> | University of California, Davis http://pgfsun.ucdavis.edu/ |
> +---------------------- Gort, Klaatu barada nikto! ----------------------+
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/mysql?unsub=1
>