I have some data within a table I am importing into an ERP solution. The data is presented like this: 

```
buyer name,order id,shipment item id,sku,quantity shipped, price etc 

```

The shipment item ID is a unique value and is the primary key along with the order id. 

My problem is this: 

I need to locate each distinct order and create a sales order based upon that information. 

The issue I am having is: 

Each shipment item ID has its own row within the database and a simple 

```
while(reader.read()){
     ...logic here...
}

```

will not work as it will attempt to create n amount of sales orders for the same customer. 

I need to formate a query that will take each shipment item ID and put its SKU, quantity etc into one row so I can attach it properly but I am unsure how this would work. 

Any help would be much appreciated.