I have one table called table1 with the structure:
year number price
2023 000334 13,2
2023 000339 13,2
2023 000362 13,2
2023 000375 26,4
2023 000379 26,4
2023 000409 13,2
2023 000418 13,2
2023 000437 26,4
2023 000440 13,2
2022 000334 1000
And a table called table2 with the same structure, but with price value null or 0:
year number price
2023 000334
2023 000339
2023 000362
2023 000375
2023 000379
2023 000409
2023 000418
2023 000437
2023 000440
2022 000334
I need update table2 price column with table1 price column values when table 1 year=table2 year and table1 number=table2 number. I’ve tried some updates, but does not update correctly, duplicate values. For example, takes for the same number in table1 and table2 the highest value in each year.