Update Monthly table with Daily max / min

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I have 2 tables, they are daily and monthly tables.

I want to update the monthly table with the max and min value of the daily
table with the corresponding month.

I figure out the following sql but it doesn't work because the group by
function seems not supposed to be allowed.

 update MONTHLY as m
  WHERE m.MONTH=(select MONTH from DAILY as d
          GROUP BY d.MONTH);

How can I make it in 1 sql statement ?


Site Timeline