How to adapt following SQL Select statement (taking latest entry) to cover the case when a row is missing a prop in the json column to take the latest one that has that prop? The table has three columns (id, json, timestamp) and the json is an array of objects ([{name:'foo', value:23}, {'name':'bar', value:100}]). Currently I have: `SELECT * FROM someTable
WHERE id = (SELECT max(id) FROM someTable )`