For what reason does the sheet not record all the data I want to write an sql query to a csv file. The query looks something like this: