DISTINT ON is apparently  a PostgreSQL-only feature. Yay postgres!