I am stuck on this issue. Can anyone help?
Write a request to print the sum of all total investment values ββin 2015 (TIV_2012) up to a scale of 2 decimal places for all policyholders that meet the following criteria:
1) Have one value TIV_2011 as one or more other policy holders.
2) Not located in the same city as another policy holder (i.e. the paragraph of the attributes of latitude, longitude) must be unique,
input format is similar to this one, table
The insurance table is described as follows:
Column name PID INTEGER TIV_2011 NUMBER TIV_2012 NUMBER LAT NUMERIC LON NUMERIC
where PID is the identifier of the policy holder, TIV_2011 is the total investment in 2011, TIV_2012 is the total investment in 2012, LAT is the latitude of the policy holder city, and LON is the longitude of the policy holder city.
For example, if the data is PID, TIV_2011, TIV_2012, lat, lon
1, 300, 400.5, 60, 70
2, 300, 500.7, 70, 80
3, 400, 400, 60, 90
4, 500, 600, 80, 80
5, 400, 300.1, 6, 6
The answer will be 1601.30. Amount (300.1, 400, 500.7, 400.5)
So far I came up with this
CHOOSE AMOUNT (TIV_2012) FROM INSURANCE, WHEN IT IS NOT UNIQUE (CHOOSE TIV_2011 from insurance);
This does not work, I get an error. Someone can help.