You are on page 1of 2

TASK A : Query Understanding

Objective : Go through the given query “Org_Query.txt” and provide your understanding.

TASK B : Develop Query

Objective : Refer to sample data provided “raw_data.xlsx” and write SQL query to generate the
following reports

Assumptions :

Current Month : Dec’2020

Previous Month : Nov’2020

State wise quotes, conversions, average premium, polices


Report 1 - State Breakdown bound (current & previous months)
State Raw Data - state
Quotes (Current Month) Raw Data - sum_num_of_quotes
Conversion(Current Month) Policies Bound (/) Quotes
Average Premium (Bound) Raw Data- sum_of_total_premium_quoted / Polices Bound
Policies Bound (Previous Month) Raw Data - bound_month / sum_producer_bound_policies
Policies Bound (Current Month) Raw Data - bound_month / sum_producer_bound_policies
Report 2 – Top 10 Parent Orgs Top 10 Parent Organizations of Current Month
Rank To be calculated
Parent Org Name Raw Data - root_organization_name
Raw Data - bound_month / Raw Data-
Policies Bound (Current Month) sum_producer_bound_policies
Final Quotes Generated Raw Data - sum_num_of_quotes

Sample Report Output :

Report 1 - State Breakdown

Average Premium Policies Bound Policies Bound


State Quotes Conversion
(Bound) (Prev Month) (Current Month)

al 917 1.64% $1,163 50 15


ar 87 0.00% 0
az 1628 2.76% $1,211 153 45
ca 5732 7.85% $1,057 1734 450
co 1320 3.18% 1739.452381 166 42
ct 227 0.88% $1,856 7 2
Report 2 - Top 10 Parent Orgs

Policies Bound Final Quotes


Rank Parent Org Name (Current) Generated
1 First Connect Insurance Services, LLC 457 8979
2 Goosehead Insurance 213 10483
3 Liberty Field Agents 212 2522
4 AFI 74 1774
5 Appalachian Underwriters, Inc. 67 472
SelectQuote Auto & Home Insurance
6 Services, LLC 44 1270
7 Insurance Market Solutions Group 33 2953
8 Networked Insurance Agents, LLC 33 347
9 Premier Group Insurance 33 409
10 SuperiorAccess 31 573
Grand Total 1197 35,603

You might also like