Fixed SQL add functionality. Fixed 24h charts