---
updatedAt: 2025-10-20T08:49:32.000Z
agentTools:
  projectIndex: https://triplewhale.readme.io/llms.txt
---

# Shipping Costs

shipping_costs

# Overview

Shipping Costs represent the expenses incurred by the seller for shipping products to customers.

> 📘 Shipping Costs = Total Shipping Costs to the seller

The calculation is based on data from the [Orders](https://triplewhale.readme.io/docs/orders-table) table.

***

### Detailed Breakdown

The formula above is derived from the following components:

* **Shipping Costs** = `SUM(shipping_costs)` --> [Orders](https://triplewhale.readme.io/docs/orders-table) table

# Insights and Actions

Shipping Costs represent the expenses incurred to deliver products to customers, offering insights into logistics and operational efficiency:

* **Control Fulfillment Expenses**: Regularly review shipping costs to identify trends or inefficiencies that may require adjustments in carrier contracts or delivery methods.
* **Incorporate Costs into Pricing**: Use shipping cost data to ensure product pricing or shipping charges adequately cover delivery expenses, protecting profit margins.
* **Optimize Shipping Strategies**: Analyze shipping costs by region or order size to refine logistics strategies, such as offering free shipping thresholds to boost order value while maintaining profitability.

### Related Metrics

* **Handling Fees**: Complements shipping costs by providing a broader view of logistics expenses, helping to analyze total fulfillment costs.
* **Order Revenue**: Contextualizes shipping costs as a percentage of revenue, helping evaluate their impact on profitability.
* **Net Profit**: Tracks overall profitability, showing the effect of shipping costs on the bottom line.

# Example Use

### Prompt

> What are my shipping costs for the last 30 days?

### Response

<Image border={false} src="https://files.readme.io/5e25aa21ca7f53947e77d12553c8b45d05978864acc5c0d824e7faf49cb8f69d-image.png" />

### Query

```sql
SELECT
  SUM(ot.shipping_costs) AS total_shipping_costs
FROM
  orders_table AS ot
WHERE
  ot.event_date BETWEEN CURRENT_DATE() - 30 AND CURRENT_DATE()  - 1;
```