csv output for query