stored function maxIntervalSum and table maxIntervalos modified and view
maxIntervalos_view created