Database Development

CASE Statement returning unpredictable results

First time using Postgresql and building a query with a CASE statement. I am trying to end up with a collection of data whereby one of the columns in the data (status) qualifies the row based on conditions. I have 3 tables (in a Posqtgresql DB) as follows: Table devices: id serial_number retired last_reported_utc_at other_data […]