# ccdw_aggr_product_sales_summary

This table summarizes product sales metrics by various dimensions. This table is aggregated from [`ccdw_fact_line_item`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_fact_line_item.md)

| Column Alias               | Data Type | Key    | Description                                                                                                                                                                                              | Index? |
| -------------------------- | --------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
| `submit_date`              | DATE      |        | Date of the sales submission.                                                                                                                                                                            | Yes    |
| `business_channel_id`      | SMALLINT  | **FK** | Foreign key to [`ccdw_dim_business_channel`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_business_channel.md).                                                                                       | Yes    |
| `registered`               | BOOLEAN   |        | Boolean indicating if the customer was registered.                                                                                                                                                       | Yes    |
| `site_id`                  | SMALLINT  | **FK** | Foreign key to [`ccdw_dim_site`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_site.md).                                                                                                               | Yes    |
| `first_time_buyer`         | BOOLEAN   |        | Boolean indicating if the customer was a first-time buyer across any site in the realm. Includes orders placed in sessions with tracking disabled (dw_dnt = 1) where buyer status cannot be established  | Yes    |
| `first_time_buyer`         | BOOLEAN   |        | Boolean indicating if the customer was a first-time buyer across any site in the realm. Includes orders placed in sessions with tracking disabled (dw_dnt = 1) where buyer status cannot be established. | Yes    |
| `product_id`               | INTEGER   | **FK** | Foreign key to [`ccdw_dim_product`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_product.md) for the product.                                                                                         | Yes    |
| `device_class_code`        | VARCHAR   |        | Device class code from [`ccdw_dim_user_agent`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_user_agent.md).                                                                                           | Yes    |
| `locale_code`              | VARCHAR   |        | Locale code from [`ccdw_dim_locale`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_locale.md).                                                                                                         | Yes    |
| `num_orders`               | INTEGER   |        | Total number of orders.                                                                                                                                                                                  | No     |
| `num_units`                | INTEGER   |        | Total number of units sold.                                                                                                                                                                              | No     |
| `std_revenue`              | NUMERIC   |        | Total revenue in standard currency. This column is aggregated from `std_li_gross_merchandise_value`.                                                                                                     | No     |
| `std_tax`                  | NUMERIC   |        | Total tax in standard currency.                                                                                                                                                                          | No     |
| `std_shipping`             | NUMERIC   |        | Total shipping cost in standard currency.                                                                                                                                                                | No     |
| `std_total_discount`       | NUMERIC   |        | Total discount in standard currency.                                                                                                                                                                     | No     |
| `std_promotional_discount` | NUMERIC   |        | Total promotional discount in standard currency.                                                                                                                                                         | No     |
| `traffic_medium`           | VARCHAR   |        | The traffic medium from [`ccdw_dim_traffic_source`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_traffic_source.md) `medium` (for example, "organic", "paid"). Historical rows can be null.           | No     |
