Skip to main content

Command Palette

Search for a command to run...

HackerRank: Weather Observation Station 3

Published
1 min read

Question and Answer:

Key Points:

What the Query Does

  • Retrieves unique CITY names where the station ID is even

Key Conditions Used

  • ID % 2 = 0 ensures only even IDs are included

  • DISTINCT CITY removes duplicate city names

Why It Works

  • Meets both requirements:
    1️⃣ Even ID filter
    2️⃣ No duplicate city results

Output

  • List of unique city names matching the condition