SELECT so.id, so.order_number, c.company_name as customer_name, so.order_date, so.delivery_date, 
   so.total_amount, so.status, so.created_at
   FROM sales_orders so
   LEFT JOIN customers c ON so.customer_id = c.id