MySQL Forums
Forum List  »  Perl

Re: possible bug using select distinct
Posted by: Vinod Sugur
Date: March 19, 2008 05:20AM


The desired output can be obtained by the following query. The earlier query by using distinct and order by clause doesn't make any sense to me as i think the column selected in SELECT clause should only be considered for order by clause.

mysql> SELECT course_type
-> FROM courses_available
-> GROUP BY course_type
-> ORDER BY MIN(start_date) ASC;
| course_type |
| TGC |
| Storage |
| MGM |
| IGP |
| LNG |
6 rows in set (0.01 sec)

Options: ReplyQuote

Written By
Re: possible bug using select distinct
March 19, 2008 05:20AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.