I have the following 3 tables: Each sample has a chain of processes it goes through and I need to get a table which includes both Sample.id and the latest date it has encountered a process, so that I can filter by this date. Something like this What I tried so far was looking at this and similar solutions: https://blog.miguelgrinberg.com/post/nested-queries-with-sqlalchemy-orm
Tag: subquery
Calculated boolean column showing if column is newest
I have a table with a structure that more or less (I’ve simplified it for the question) looks like the following: id (P.K.) creation_ts some_field 1 2021-08-19 foo 2 2021-08-18 foo 3 2021-08-17 foo 4 NULL bar 5 2021-01-01 bar 6 2021-01-02 bar And I’m trying build a query to show a calculated column that per each row with the