I need to get orders data directly from the database. I have got all orders (about 18,000) since January 2020. I need to do a join to customer_entity however, I realized that about 300 records were missing.
By investigating further, I found out that the customer_id value is null for most of the records. Some records which do have a customer_id column set but shipping address id fields are null. These latter occur for orders in processing status.
Most curious is the null value in the customer_id column of some orders, even in orders in complete status.
For the query, I need to join customersthe customer's table so it is not an option to get all data from the sales_order table.
Any help? Thanks
Jaime