I should have selected better example here in the first place.
Can you show me how you could use that to get the latest 2 events from the events table using DISTINCT ON?
CREATE TABLE events (
person TEXT,
event_type TEXT ,
created_at TIMESTAMP
);
INSERT INTO events VALUES
('onni.hakala','message',now()),
('laurenz.albe','non-helpful reply',now() + interval '30 minutes'),
('onni.hakala','clarifying reply',now() + interval '35 minutes'),
('someone.else','other reply',now() + interval '40 minutes'),
('onni.hakala','other reply',now() + interval '45 minutes'),
('someone.else','other reply',now() + interval '50 minutes');