SQL got bad-ass