> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.coactive.ai/latest/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.coactive.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.coactive.ai/_mcp/server.

# Dynamic Tag Tables

When a tag group finishes scoring on a dataset, its scores are available as SQL views. Explore and analyze them in the **Queries** tab. To check whether scoring is complete, see [Check Scoring Progress](/docs-guides/core-features/dynamic-tags/overview#check-scoring-progress).

## Dynamic tag views

Every dynamic tag group has four views, one for each level. They appear in the output of `SHOW TABLES`.

| View                                     | Level              |
| ---------------------------------------- | ------------------ |
| `dt_[dynamic tag group name]_video`      | Video              |
| `dt_[dynamic tag group name]_shot`       | Shot               |
| `dt_[dynamic tag group name]_visual`     | Keyframe           |
| `dt_[dynamic tag group name]_transcript` | Transcript segment |

Replace `[dynamic tag group name]` with your group's name in lowercase, with spaces replaced by underscores. For example, a group named Casual Social Celebrations has the view `dt_casual_social_celebrations_video`.

In every view, `tag_name` is stored in lowercase (for example, `pickup trucks`), even when the UI shows title case. Filter on the lowercase value.

### Threshold sources

Each view has a `threshold_decision` column that is `1` when the tag applies and `0` when it doesn't. The threshold it uses depends on the level:

| View          | Threshold                                    | Default |
| ------------- | -------------------------------------------- | ------- |
| `_video`      | The threshold set in Review videos           | 0.5     |
| `_visual`     | The **Visual** threshold on the tag page     | 0.5     |
| `_transcript` | The **Transcript** threshold on the tag page | 0.5     |
| `_shot`       | The **Combined** threshold on the tag page   | 0.5     |

To apply a different cutoff in SQL, filter on `score` instead of `threshold_decision`.

### dt\_\[dynamic tag group name]\_video

Join to `coactive_table_video` on `coactive_video_id` for metadata.

| Column                 | Description                                                                                               | Format           |
| ---------------------- | --------------------------------------------------------------------------------------------------------- | ---------------- |
| **coactive_video_id**  | Coactive video identifier                                                                                 | string           |
| **tag_name**           | Name of the dynamic tag applied to the video, in lowercase                                                | string           |
| **score**              | Relevance score representing the likelihood the tag applies to the video                                  | float (0.0–1.0)  |
| **threshold_decision** | Binary indicator for whether the tag applies, based on the threshold set in Review videos (default = 0.5) | integer (0 or 1) |

### dt\_\[dynamic tag group name]\_shot

This view has no video ID or timestamps. Join `coactive_shot_id` to `coactive_table_slice.id` to get `video_id`, `start_time_ms`, and `end_time_ms`, then join `video_id` to `coactive_table_video.coactive_video_id` for metadata.

| Column                 | Description                                                                                                       | Format           |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------------- |
| **coactive_shot_id**   | Coactive shot identifier                                                                                          | string           |
| **tag_name**           | Name of the dynamic tag applied to the shot, in lowercase                                                         | string           |
| **score**              | Relevance score representing the likelihood the tag applies to the shot                                           | float (0.0–1.0)  |
| **threshold_decision** | Binary indicator for whether the tag applies, based on the **Combined** threshold on the tag page (default = 0.5) | integer (0 or 1) |

### dt\_\[dynamic tag group name]\_visual

This view is keyframe-level and has no video ID. Join to `coactive_table` on `coactive_image_id` to get `coactive_video_id` and metadata. The view reflects the latest version of each tag.

| Column                 | Description                                                                                                     | Format           |
| ---------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------- |
| **coactive_image_id**  | Coactive identifier of the image or keyframe                                                                    | string           |
| **tag_name**           | Name of the dynamic tag applied to the image or keyframe, in lowercase                                          | string           |
| **score**              | Relevance score representing the likelihood the tag applies to the image or keyframe                            | float (0.0–1.0)  |
| **threshold_decision** | Binary indicator for whether the tag applies, based on the **Visual** threshold on the tag page (default = 0.5) | integer (0 or 1) |

### dt\_\[dynamic tag group name]\_transcript

Join `coactive_transcript_id` to `coactive_table_transcription.id` to get the segment's `video_id`, `text`, `start_time`, and `end_time`.

| Column                     | Description                                                                                                         | Format           |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------- |
| **coactive_transcript_id** | Coactive identifier of the transcript segment                                                                       | string           |
| **tag_name**               | Name of the dynamic tag applied to the transcript segment, in lowercase                                             | string           |
| **score**                  | Relevance score representing the likelihood the tag applies to the transcript segment                               | float (0.0–1.0)  |
| **threshold_decision**     | Binary indicator for whether the tag applies, based on the **Transcript** threshold on the tag page (default = 0.5) | integer (0 or 1) |

## Join for advanced analytics

Join the dynamic tag views with the core tables to aggregate scores by video, filter by keyframe timestamp (`keyframe_time_ms`), or add file metadata to your results. For the columns in each core table, see [SQL Table Reference](/docs-guides/core-features/query-engine/sql-table-reference).

### Example query

This query finds keyframes where the `basketball` tag applies and adds show metadata from each keyframe's video. The `metadata` column is a `map<string,string>`, so read each value with `metadata['key']`. Keys depend on the metadata ingested with your videos. To list them, see [Read metadata values](/docs-guides/core-features/query-engine/getting-started#read-metadata-values), then replace `SeriesName` and `EpisodeName` with your own keys.

```sql
SELECT
  dt.coactive_image_id,
  t.coactive_video_id,
  t.keyframe_time_ms,
  dt.score,
  v.metadata['SeriesName'] AS series_name,
  v.metadata['EpisodeName'] AS episode_name
FROM dt_sports_visual dt
JOIN coactive_table t
  ON dt.coactive_image_id = t.coactive_image_id
LEFT JOIN coactive_table_video v
  ON t.coactive_video_id = v.coactive_video_id
WHERE dt.tag_name = 'basketball'  -- tag_name is stored in lowercase
  AND dt.threshold_decision = 1   -- uses the Visual threshold on the tag page
ORDER BY dt.score DESC;
```

For more query patterns, such as tag distribution and the top tags for each image or video, see [Analyzing Dynamic Tags with SQL](/docs-guides/deep-dives/analyzing-dynamic-tags-with-sql).