Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Query of ABCD Company's Investments in 2017 Write a query to the sum of all total investment value in 2017 OR IVN 2017, to

image text in transcribed
Database Query of ABCD Company's Investments in 2017 Write a query to the sum of all total investment value in 2017 OR IVN 2017, to a scale of 2 decimal places for all policyholders who meet the following criteria: 1. Have the same IVN 2016 value as one or more other policyholders. 2. Are not located in the same city as another policyholder (ie; the(latitude, longitude) attribute pair must be unique Input Format INSURANCE Name ID IVN 2016 Type Decimal Decimal Decimal Decimal Description Integer This is the ID of policyholder's policy IVN_2017 LAT LON This is the total investment value in 2016 This is the total investment value in 2017 This is the latitude of the policy holder's city This is the longitude of the policy holder's city * Sample output- 1711758.65 Sample Input INSURANCE ID 885991 908170 487022 723719 628922 IVN 2016 VN 2017 LAT 1449866.88 1338076.34 30.285202 82.105835 1849.32 1987.37 1812.32 295022.71 31.285202 82.105835 1449866.88 369024.45 31.285257 82.139542 1849.32 14657.86 32.285257 82.139542 LON 31.285202 82.105835 Detail Explanation In the sample test case; For ID 885991: It has the same IVN-2016 as ID 723719. It does not have any matching- . latitude, longitude) For ID 908170: It has the same IVN 2016 as ID 628922. It does have a matching (latitude, longitude) pair with ID 487022 For ID 487022: It does don't have the same IVN 2016 as anyone. For ID 723719: It has the same IVN 2016 as ID 885991. It does not have any matching (latitude, longitude) For ID 628922: It has the same IVN _2016 as ID 908170. It does not have any matching (latitude, longitude) .Hence the sum would be 1338076.34+369024.45+4657.86-1711758.65 Please read all the instructions carefully and write the Query to the sum of all total investment value in 2017 in 2 decimal places Below using (Use MySQL if necessary). If it is possible please add comments & explanations for

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago