Rick Robinson wrote:
Hi all-
I'm using MySQL 4.1.7, trying to do a subquery that's apparently unsupported -
I'm hoping someone can provide a quick alternative for me.
I have a simple table Z with 3 columns, k1, k2, and total_amt, where k1 and k2
make up the primary key. I want to create a report that lists the the top 10
total_amt for each k1.

Sounds like a "group-wise maximum" type of question, take a look at this:

http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html

--
Roger


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to