- … - updated_at ࠷ޙͷupdated_atΛอଘ > updated_at SELECT * EXCEPT(rn) FROM (SELECT *, row_number() over (PARTITION BY id ORDER BY updated_at DESC) AS rn FROM (SELECT * FROM BQ_DATASET.`{0}`)) WHERE rn = 1 ORDER BY id".format(digdag.env.params['UPDATE_TABLE']) idͰpartition byͯ͠updated_atͰorder byͯ͠৽͍͠σʔλ͚ͩΛऔಘ https://tech.mercari.com/entry/2018/06/28/100000