I have a database with polygons. The data is three buffers (dounuts) around some points of interest with a unique location id. All donuts should get data from one or two of the neighbouring donuts.
This is the starting table (first four attributes are the starting ones):
idlocation_idbuffer_nrimportance_valueimportance_value_new110111022 (10+7+5)21012712 (7+5)3101355 (5)410212034 (20+11+3)510221114 (11+3)6102333 (3)7103123-etcMy table is sorted on location_id and buffer_nr. Basically:
- for each buffer_nr=1 I want to create a new value based on the sum of all importance_value with the same location_id
- for each buffer_nr=2 I want to create a new value based on the sum importance_value wwith buffer_id 2 and 3.