group by read and write to csv
sql join with multiple columns