List:General Discussion« Previous MessageNext Message »
From:Mark Jones Date:August 11 2002 9:32pm
Subject:query quandary
View as plain text  
I have a query I'm trying to construct on a table which contains a title and 
date of records.  I want to sort the query so that records are listed by 
title with the newest dates first--keeping the records with identical titles 
together and order by date within the title groups.

For example:

Title 2, 10-30-2001
Title 2, 10-15-2001
Title 2, 10-01-2001
Title 1, 10-20-2001
Title 1, 10-10.2001
Title 3, 10-05-2001

My attempt at SELECT title, date FROM tablename GROUP BY title, date DESC 
produced an appropriately grouped result set, with the titles ordered within 
the groups by date, BUT it put the groups in order alphabetically, whereas 
I'm wanting them ordered by the date of the first title in the groups.

Any suggestions?


Mark Jones

MSN Photos is the easiest way to share and print your photos:

query quandaryMark Jones12 Aug
  • Re: query quandaryDL Neil13 Aug
  • Re: query quandaryMark Jones15 Aug
    • Re: query quandaryDan Nelson15 Aug