---
schema_version: "1"
id: d6cdc3d7db099f1fcd4e701b986343528c8b748de9d76c80305ecab2f68454c1
title: ccdw_aggr_search_query
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/guides/jdbc/jdbc_ccdw_aggr_search_query.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/jdbc_ccdw_aggr_search_query.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 38171e8f46accb1f84f6edfbccc0f8f302723fc638e8196605a83dbb28e03184
products:
  - Composable Storefront
  - Salesforce APIs
---
# ccdw_aggr_search_query

This table provides details on search queries and their outcomes.

> **Note:** This table is constrained by IP Address Filters configured in Business Manager.

**note:** `ccdw_aggr_search_query` aggregates data specifically from search events, while `ccdw_aggr_search` aggregates data directly from visits. 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`](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/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`](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/jdbc_ccdw_dim_user_agent.md). | Yes    |
| `locale_code`                       | VARCHAR   | **FK** | Locale code from [`ccdw_dim_locale`](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/jdbc_ccdw_dim_locale.md).               | Yes    |
| `query`                             | VARCHAR   |        | The actual search query entered.                                             | Yes    |
| `num_searches_with_results`         | INTEGER   |        | Number of searches for this query that yielded results.                      | No     |
| `num_searches_without_results`      | INTEGER   |        | Number of searches for this query that yielded no results.                   | No     |
| `num_results`                       | INTEGER   |        | Total number of search results returned for this query.                      | No     |
| `num_visits_with_search_results`    | INTEGER   |        | Number of visits that included searches with results.                        | No     |
| `num_visits_without_search_results` | INTEGER   |        | Number of visits that included searches without results.                     | No     |
| `num_clicks`                        | INTEGER   |        | Total number of clicks on search results for this query.                     | No     |

<!-- **Indices**: `search_date,registered,site_id,device_class_code,locale_code,query` -->
