Re: Why does "MAX(t.a), t.b" return fields from different records?

2002-01-27 Thread dave-mlist
Hi Paul, Me> I think that the command "SELECT id, ref, MAX(timestamp), field FROM t Me> GROUP BY ref;" should give me fields with the latest timestamp for Me> each ref in my table. But it doesn't. Paul> 1) Why do you think that query should return that result? Apparently because I had some mis

Why does "MAX(t.a), t.b" return fields from different records?

2002-01-27 Thread dave-mlist
I think that the command "SELECT id, ref, MAX(timestamp), field FROM t GROUP BY ref;" should give me fields with the latest timestamp for each ref in my table. But it doesn't. I have the following table: mysql> describe t; +---+--+--+-+-++