Allen McGrath wrote:
have you tried select writer , date from articles group by writer,date order by date desc ?
I don't think that will work if the dates inside the date field are unique. With data like the following:
+---------+---------------+
| writer | date |
+---------+---------------+
| author1 | 20020105123055|
| author2 | 20020106113005|
| author3 | 20011230072555|
| author1 | 20020111114510|
| author2 | 20020118123428|
| author3 | 20011030084052|
+---------|---------------+
all rows will be returned because each row is unique, i.e. there are no 2 or more rows that have BOTH the writer and date columns containing the same values.
What will work for data like this is a query like:
SELECT writer, max(date) from articles group by author
No need for the order by clause but you could add it on for s's & g's.
Hope this helps and gives you some insight.
BT