List:General Discussion« Previous MessageNext Message »
From:Nils Valentin Date:June 4 2003 3:38pm
Subject:Re: nested ORDER BY statements
View as plain text  
Hi David,

can't give you detailed advice but I believe you look for 

SELECT...GROUP BY ... ORDER BY

Please see the docs like "info mysql".

Best regards

Nils Valentin
Tokyo/Japan




\
2003年 6月 4日 水曜日 22:37、Dave Terrio さんは書きました:
> Hello - I'm a relative newcomer to development with MySQL and am having a
> problem with ordering my query results...
>
> I first want to select the 50 most recently created records (with respect
> to my date field) and then order these with respect to another field (eg
> name). That way I'm always "ordering" the 50 most recent records.  The
> problem is, I can't figure out how to do this - as MYSQl complains when I
> put 2 "ORDER BY" statements in a query such as in:
>
> order by table1.time_created desc limit 50 order by table1.name;
>
> Any suggestions?
>
> Thanks,
> -David

-- 
================================================
Valentin Nils
Internet Technology

 E-Mail: nils@stripped
 URL: http://www.knowd.co.jp
================================================

Thread
nested ORDER BY statementsDave Terrio4 Jun
  • Re: nested ORDER BY statementsJose Miguel Pérez4 Jun
  • Re: nested ORDER BY statementsNils Valentin5 Jun
RE: nested ORDER BY statementsMike Hillyer4 Jun
RE: nested ORDER BY statementsMike Hillyer4 Jun
  • Re: nested ORDER BY statementst.wiegman4 Jun
RE: nested ORDER BY statementsMike Hillyer4 Jun
RE: nested ORDER BY statementsMike Hillyer4 Jun