Fwd: Re: Selecting with JOIN, GROUP BY and MAX

2003-07-22 Thread simon blenkinsop
OK, now we are both confused. There is only 1 instance of each unit in the unit table. Unit_id id the primary key. There are thousands of instances of each unit in the log table. Each record in this table holds unit_id, temperature and date. If I understand correctly, your suggested q

Re: Selecting with JOIN, GROUP BY and MAX

2003-07-22 Thread John Larsen
Geez, do I have to do all your work for you, :) First thing I can think of is, Ok this makes no sence you have a units table with unit_id as its main descriptor, but there can be several cases with the same unit_id but you want the one with the max date. Date on the other hand is stored in anoth