More MySQL conversion fun.
I'm looking to convert this syntax to MySQL
SELECT DISTINCT TOP 1 Postcode,
Count(*) AS PopSubCount
...........
GROUP BY Postcode
ORDER BY Count(*) DESC
I've worked out that
"TOP 1" under select
needs to be replaced by
"LIMIT 1" at the bottom.
But what to do with the Count(*) DESC ?
I have tried
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