SQLQuokka
Start practicing
QuestionsLearnSandboxFeaturesRoadmapFAQ

Qualifying Policy Investments

Unsolved

An insurer wants the total current-year investment value (tiv_2016) for policyholders who meet both conditions: their tiv_2015 equals the tiv_2015 of at least one other policyholder, and no other policyholder is at the same location (the same lat and lon pair). Write an SQL query that returns a single column, tiv_2016, rounded to 2 decimal places.

SQL Query Editor (Ctrl+Enter to run)
0 characters · Valid
Canonical Solution Official

Official Solution is Hidden

Try solving the question with the schema explorer and hints first. When ready, reveal the verified canonical query and step-by-step logic breakdown.

Community Q&A & Discussion

Ask questions, share alternate queries, and explore solutions

0 comments
Asked By:
Classic pattern · not tied to a specific company

Submission History

Your recent query executions and answer checks

Execution Pipeline:
FROM insurance
Full source dataset
5 rows total
Ready. Type a query to see live execution.
Clause: Auto-Sync · AlaSQL Engine