Readings Through the Garbage

Readings Through the Garbage

The station recorder wrote sensor readings as strings: honest numbers sit next to n/a, empty strings and commas for decimal points. Convert raw_power to a floating-point number so garbage becomes NULL instead of crashing the query. Output reading_id, station and the result as power, ordered by reading_id.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.

reading_idstationpower
1Reactor-A12.5
2Reactor-ANULL
3Reactor-BNULL
PostgreSQLv16

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid