Table 1 (~1000 rows): Column_names : date, time, location_name, sum_severity_of_incident
Table 2 (~1000,000 rows) Column_names: date, time, location_name, vehicle_name, number of people, severity_of_incident - (double precision type - between 0 & 1)
Table 2 contains list of incidents with severity. I am trying to fill the values in the sum_severity_of_incident column in table 1 by summing the values in the severity_of_incident column in Table 2 which have the same date, time & location_name.
I am new to Postgresql and this problem looks like a FOR loop problem in any other programming language. I could not find a straightforward solution in postgresql.