Full threadnknealk·There’s a LAST_VALUE statement for this kind of thing that most databases support. Partition by sale person name order by number of products.View on HN