added sql to create battery analysis table