# ccdw_aggr_search

This table summarizes general search activity.

:::note
`ccdw_aggr_search` aggregates data directly from visits, while `ccdw_aggr_search_query` aggregates data specifically from search events. Because these tables track different events and methods, aggregating the `ccdw_aggr_search_query` table doesn't reproduce the same numerical results found in `ccdw_aggr_search`.
:::

| Column Alias                   | Data Type | Key    | Description                                                                                                    | Index? |
| ------------------------------ | --------- | ------ | -------------------------------------------------------------------------------------------------------------- | ------ |
| `search_date`                  | DATE      |        | Date of the search activity.                                                                                   | Yes    |
| `site_id`                      | SMALLINT  | **FK** | Foreign key to [`ccdw_dim_site`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_site.md).                     | Yes    |
| `registered`                   | BOOLEAN   |        | Boolean indicating if the user was registered.                                                                 | Yes    |
| `device_class_code`            | VARCHAR   | **FK** | Device class code from [`ccdw_dim_user_agent`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_user_agent.md). | Yes    |
| `locale_code`                  | VARCHAR   | **FK** | Locale code from [`ccdw_dim_locale`](/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_locale.md).               | Yes    |
| `num_searches_with_results`    | INTEGER   |        | Number of searches that yielded results.                                                                       | No     |
| `num_searches_without_results` | INTEGER   |        | Number of searches that yielded no results.                                                                    | No     |
| `num_results`                  | INTEGER   |        | Total number of search results returned.                                                                       | No     |
| `num_clicks`                   | INTEGER   |        | Total number of clicks on search results.                                                                      | No     |
