How to compute Kaplan-Meier survival curves with SQL | Hacker News Reader