To get order collection by customer wise i.e.., customer A and customer B have placed order and it should retrieve by customer wise per collection?
public function getOrdersByCustomer() {
$collect = $this->_orderCollectionFactory->create()->addFieldToSelect('*');
$collection = $collect->getSelect()->group('customer_id');
return $collection;
}
The above returns null.Thanks in advance