Export the query results in CSV format.