column_property (or other extra column) with window function?
问题 I have the following situation, using SQLAlchemy with a MySQL database. Assume a Person table that looks like this: +------+-----------+----------+------------+ | ID | firstname | lastname | startdate | +------+-----------+----------+------------+ | 43 | Bob | Smith | 2016-12-04 | | 873 | Mary | Jones | 2018-05-01 | | 120 | Bob | Smith | 2020-04-02 | | 339 | Bob | Jones | 2019-03-01 | | 1022 | Bob | Smith | 2015-11-21 | +------+-----------+----------+------------+ I need to generate an extra