PostgreSQL: Get first non-true row or last row
I have a table containing measurement information of several tests per devices: device_id gives the information on which device was tested measurement_no is an incrementing number giving the order in which tests has been performed test gives you the name…