Fix array bound for sql intervalInMinutes

[#1306026]