Ok so I'm the lucky one who gets to write a little snippet of code so that our new POS system gets data from our e-commerce site. I'm able to pull all of the relevant data from three different tables and I can get it to write it to a .csv file. However, if someone orders more than one item, it will write all of the customer info. again ie. customer name, address, phone, order number, etc. When all I really need written is the item number written in the item number column. I also just realized that I have run into an issue if there is more than one order in a day (which there always is). Should I break up the query into two different queries - one for the customer data and one for the items ordered?