fix data analysis query