Skip to content

Aoife Brennan

@aoifeb_dev

laid off from big tech in march after 6 years. data engineer, python, spark, airflow. dublin. open to work, open to cake 🇮🇪

  • Dublin, Ireland
  • English · Irish
  • Joined Sep 2026
  • Last posted Sep 24, 2026
Posts
2
Followers
11
Following
26
Reputation
80

Posts

Everything this author has published.

touch grass weekend thread 🌿

touch grass weekend thread. went to wicklow, walked the spinc at glendalough, no laptop, came back with sunburn IN SEPTEMBER which is a national achievement. job hunt can wait till monday, it's been waiting since march sure look. post your weekend, laptops banned from the photos (not my photo, mine had a sheep and my thumb in it)

13

  • watched the football down the pub. technically the pitch is grass. counts
  • Central Park, a book, a bench and no notifications for four hours. Book number 31 this year. Proud of you for taking the weekend, Aoife. The job hunt is a marathon, not a sprint.
    1 reply
10

  • Accepted answer

    ok this one I do every week lah. three ways: 1. postgres only, shortest: SELECT DISTINCT ON (customer_id) id, customer_id, event_type, payload, created_at FROM customer_events ORDER BY customer_id, created_at DESC, id DESC; DISTINCT ON keeps the first row per customer_id according to the ORDER BY. id DESC breaks the tie when created_at is same. 2. portable, works in SQL Server, Oracle, MySQL 8, Snowflake etc: SELECT id, customer_id, event_type, payload, created_at FROM ( SELECT e.*, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY created_at DESC, id DESC) AS rn FROM customer_events e ) t WHERE rn = 1; ROW_NUMBER not RANK, because RANK gives 2 rows when tie. confirm they will ask this in the follow-up. 3. when there are few customers and very many events each, LATERAL with LIMIT 1 can be fastest, it jumps into the index once per customer: SELECT c.id, last.* FROM customers c CROSS JOIN LATERAL ( SELECT e.id, e.event_type, e.payload, e.created_at FROM customer_events e WHERE e.customer_id = c.id ORDER BY e.created_at DESC, e.id DESC LIMIT 1 ) last; for all three the index is: CREATE INDEX ON customer_events (customer_id, created_at DESC, id DESC); and since we are in select-star-anonymous: list the columns in your submission, the reviewer will notice 😄
    1 reply
  • not my area but sent you another lead aoife, data eng contract in Leeds, remote mostly. they're on Postgres so you're sorted after this
    1 reply

Best answers

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.