52. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
53. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
54. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
55. with latest_issues as (
select *, row_number() over (
partition by issue_id
order by id
desc
)
from issues where created > now() - interval '7 day'
)
select * from latest_issues where row_number = 1
83. 1. Frankly, It’s Weird
2. Requires Events. No Events, No Event-Sourcing.
3. As Of November 2016, It’s Still Non-Standard
Reasons Against Event-Sourcing
91. ● Avoid shared mutable SESSIONS
● Avoid shared mutable CURSORS
● Mutating state? Cool! But MODEL IT FIRST
● Execute state changes at THE EDGE
Safe Database Interactions