> just a stab in the dark, if I understand what your trying to do and =
> MySQL supports it.
> 
> MAX()

Far as I understand it, MAX is to find the highest value of a particular
variable.
I used Count, because it needs to extract the highest number of instances
of a particular value of a particular variable.
Could use a separate looped query, but this makes the program run very
slowly.
 
> PS. how about a MySQL mailing list, they would be more helpfull I guess?

Not telling me to bugger off, are ya ;) ?
 
> -----Original Message-----
> From: Andrew Dickinson [mailto:[EMAIL PROTECTED]
> Sent: Friday, 12 December 2003 10:52 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] Slight OT : MySQL Desc equivalent
> 
> 
> More MySQL conversion fun.
> 
> I'm looking to convert this syntax to MySQL
> 
> SELECT        DISTINCT TOP 1 Postcode,=20
>       Count(*) AS PopSubCount
> ...........
> GROUP BY Postcode
> ORDER BY Count(*) DESC
> 
> I've worked out that=20
> "TOP 1" under select=20
> needs to be replaced by
> "LIMIT 1" at the bottom.
> 
> But what to do with the Count(*) DESC ?
> 
> I have tried=20
> LIMIT 1
> ORDER BY Count(*) DESC
> 
> and
> 
> ORDER BY Count(*) DESC
> LIMIT 1
> 
> But they both come out as syntax errors.
> 
> Briefly, the purpose of this code is to extract the postcode where the
> largest number of customers (that's what Count DESC is used for - to =
> find
> the largest number) are living, and then break it down for further
> deomgraphic stats.
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to =
> [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to