fixed SQL for strict mode thanks to @Tansien