stupid sql, not being python...