I want to select all rows from one table and insert them into another with only the max and min values on all rows. Cant figure out how to write this without a group by clause. Its a big table so (update set=? from (select max...)) is to slow
table1:
id,values
1,2
2,4
3,1
table2:
id,max,min
1,4,1
2,4,1
3,4,1