> For the complete documentation index, see [llms.txt](https://help.smartico.ai/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse/smartico-dwh-transactional-views-gamification.md). Agents can also search and read this documentation through its [MCP server](https://help.smartico.ai/welcome/~gitbook/mcp).

# Smartico DWH \ Transactional views, Gamification

This page describes the transactional views that hold gamification events created by Smartico: points, gems and diamonds, levels, missions, the Store, mini-games, tournaments, raffles and jackpots, and clans.

The name of a view is the name of the event with the "tr\_" prefix. For example, the view **tr\_ach\_points\_added** holds the event **ach\_points\_added**. Read the general rules of the DWH on the [Smartico Data Warehouse (DWH)](https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse.md#transactional-tables) page first.

## Rules for all transactional views

* One row is one event. The primary key is **event\_id**.
* Every view is partitioned by **event\_time**. Always filter on it, and do not apply a function to the column in the filter.
* The views keep the events of the last 1080 days.
* A view appears in your dataset after its first event.
* Columns that hold the ID of an object (a mission, a level, a Store item, a mini-game, a tournament, a raffle, a jackpot, a clan) join to the dimension tables named under each view.
* Columns marked "ID of a value" hold a number, not a text. The text of each number is in a lookup view of your dataset, named under each view: see [Text of value IDs](#text-of-value-ids). The numbers can differ between labels and between Smartico environments, so filter by the text through the lookup view, not by a fixed number.
* Yes/No (BOOL) columns hold TRUE or are empty. Empty means false, so filter with **IS NOT TRUE** instead of **= false**.
* A view can also have old columns that are no longer filled. They are not listed here.

Columns in every view:

| Column                     | Type      | Description                                                                                                                                                  |
| -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| event\_time                | TIMESTAMP | Time of the event (UTC)                                                                                                                                      |
| ingest\_time               | TIMESTAMP | Time when the event was stored in Smartico                                                                                                                   |
| label\_id                  | INT64     | Label ID                                                                                                                                                     |
| user\_id                   | INT64     | Smartico user ID. Joins to [j\_user\_no\_enums](https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse.md#query-for-user-profile-details) |
| event\_id                  | INT64     | ID of the event in Smartico. Use it to remove duplicates                                                                                                     |
| user\_to\_label\_cur\_rate | NUMERIC   | Rate from the player's currency to the label currency. Not needed on this page                                                                               |

The tables below list the other columns of each view.

## Text of value IDs

The text of a column marked "ID of a value" is in a view of your dataset. **Joins** under each view names it for every such column:

* For most columns, a view named **lookup\_** plus the name of the column. For example, the text of **ach\_points\_last\_change\_source** is in **dwh\_ext\_xxx.lookup\_ach\_points\_last\_change\_source**.

A lookup\_ view has two columns:

| Column | Type   | Description                  |
| ------ | ------ | ---------------------------- |
| id     | INT64  | The ID that the column holds |
| value  | STRING | The text of the ID           |

* It holds the values of your label and the values shared by all labels.
* It is in your dataset when a transactional view of your dataset has the column.
* A new value reaches the lookup view up to about an hour after it first appears. Use LEFT JOIN, so that the events of a new value stay in your totals; their text is empty until then.
* For a column of type INT64\[] (a list of IDs), use CROSS JOIN UNNEST on the column first, then join each ID.

Points additions of the last 7 days per source

```sql
SELECT L.value AS source, COUNT(*) AS additions
FROM dwh_ext_xxx.tr_ach_points_added P
LEFT JOIN dwh_ext_xxx.lookup_ach_points_last_change_source L ON L.id = P.ach_points_last_change_source
WHERE P.event_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY source
ORDER BY additions DESC
```

## Points, Gems, Diamonds

### dwh\_ext\_xxx.tr\_ach\_points\_added

Points added to players. One row per addition.

For more details on each points change (requested and actual amount, leaderboard and level flags, the source by name), use [g\_ach\_points\_change\_log](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_ach_points_change_log).

**Joins:**

* ach\_points\_last\_change\_source → [lookup\_ach\_points\_last\_change\_source](#text-of-value-ids) (id)

| Column                            | Type    | Description                                                                                   |
| --------------------------------- | ------- | --------------------------------------------------------------------------------------------- |
| ach\_points\_last\_change         | NUMERIC | Number of points added                                                                        |
| ach\_points\_balance              | NUMERIC | The player's points balance after the addition (the points the player can spend in the Store) |
| ach\_points\_last\_change\_source | INT64   | Source of the points. ID of a value; text in lookup\_ach\_points\_last\_change\_source        |

Points added per day in the last 7 days

```sql
SELECT DATE(event_time) AS day,
       COUNT(DISTINCT user_id) AS players,
       SUM(ach_points_last_change) AS points_added
FROM dwh_ext_xxx.tr_ach_points_added
WHERE event_time >= TIMESTAMP_TRUNC(TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY), DAY)
GROUP BY day
ORDER BY day
```

### dwh\_ext\_xxx.tr\_ach\_points\_deducted

Points taken from players, for example for a Store purchase, a mini-game spin, an avatar or a clan entry fee. One row per deduction.

**Joins:**

* ach\_points\_last\_change\_source → [lookup\_ach\_points\_last\_change\_source](#text-of-value-ids) (id)

| Column                            | Type    | Description                                                                                                                                  |
| --------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| ach\_points\_last\_change         | NUMERIC | Points deducted, as a negative number (for example -100)                                                                                     |
| ach\_points\_balance              | NUMERIC | The player's points balance after the deduction                                                                                              |
| ach\_points\_last\_change\_source | INT64   | Reason of the deduction (for example STOREPURCHASE, SAWSPIN, AVATAR, CLAN). ID of a value; text in lookup\_ach\_points\_last\_change\_source |

### dwh\_ext\_xxx.tr\_ach\_gems\_added

Gems added to players. One row per addition. For the source of each change, use [g\_gems\_diamonds\_change\_log](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_gems_diamonds_change_log).

| Column                    | Type    | Description          |
| ------------------------- | ------- | -------------------- |
| ach\_gems\_change\_amount | NUMERIC | Number of gems added |

### dwh\_ext\_xxx.tr\_ach\_gems\_deducted

Gems taken from players. One row per deduction.

| Column                    | Type    | Description                                   |
| ------------------------- | ------- | --------------------------------------------- |
| ach\_gems\_change\_amount | NUMERIC | Number of gems deducted, as a positive number |

### dwh\_ext\_xxx.tr\_ach\_diamonds\_added

Diamonds added to players. One row per addition. For the source of each change, use [g\_gems\_diamonds\_change\_log](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_gems_diamonds_change_log).

| Column                        | Type    | Description              |
| ----------------------------- | ------- | ------------------------ |
| ach\_diamonds\_change\_amount | NUMERIC | Number of diamonds added |

### dwh\_ext\_xxx.tr\_ach\_diamonds\_deducted

Diamonds taken from players. One row per deduction.

| Column                        | Type    | Description                                       |
| ----------------------------- | ------- | ------------------------------------------------- |
| ach\_diamonds\_change\_amount | NUMERIC | Number of diamonds deducted, as a positive number |

## Levels

### dwh\_ext\_xxx.tr\_ach\_level\_changed

A player moved to another level. One row per change. For more details, use [g\_ach\_levels\_changed](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_ach_levels_changed).

**Joins:**

* ach\_level\_current → [dm\_ach\_level](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_ach_level) (level\_id)
* ach\_level\_direction → [lookup\_ach\_level\_direction](#text-of-value-ids) (id)

| Column                | Type  | Description                                                                   |
| --------------------- | ----- | ----------------------------------------------------------------------------- |
| ach\_level\_current   | INT64 | ID of the player's level after the change                                     |
| ach\_level\_direction | INT64 | Direction of the change. ID of a value; text in lookup\_ach\_level\_direction |

## Missions

### dwh\_ext\_xxx.tr\_ach\_achievement\_completed

A player completed a mission. One row per completion. For more details, use [g\_ach\_completed](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_ach_completed).

**Joins:**

* ach\_achievement\_last\_completed\_id → [dm\_ach](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_ach) (ach\_id)

| Column                                | Type  | Description                 |
| ------------------------------------- | ----- | --------------------------- |
| ach\_achievement\_last\_completed\_id | INT64 | ID of the completed mission |

### dwh\_ext\_xxx.tr\_ach\_achievement\_task\_completed

A player completed a task of a mission. One row per task. When the task is the last one of the mission, this event comes before the mission completed event.

**Joins:**

* ach\_last\_completed\_task\_mission\_id → [dm\_ach](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_ach) (ach\_id)

| Column                                    | Type  | Description                                                           |
| ----------------------------------------- | ----- | --------------------------------------------------------------------- |
| ach\_last\_completed\_task\_mission\_id   | INT64 | ID of the mission of the completed task                               |
| ach\_is\_achievement\_completed\_by\_task | BOOL  | TRUE when this task was the last one and the mission is completed too |

## Store

### dwh\_ext\_xxx.tr\_shop\_item\_purchase\_successed

A player bought an item in the Store. One row per purchase. For the price and other details, use [g\_shop\_transactions](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_shop_transactions).

**Joins:**

* ach\_last\_item\_purchased → [dm\_shop\_item](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_shop_item) (item\_id)

| Column                                   | Type     | Description                                                       |
| ---------------------------------------- | -------- | ----------------------------------------------------------------- |
| ach\_last\_item\_purchased               | INT64    | ID of the purchased item                                          |
| ach\_last\_item\_purchased\_type         | INT64    | Type of the item. Same values as item\_type\_id in dm\_shop\_item |
| ach\_shop\_last\_purchase\_category\_ids | INT64\[] | IDs of the Store categories of the item                           |

## Mini-games

### dwh\_ext\_xxx.tr\_minigame\_attempt

A player tried to play a mini-game. One row per attempt, successful or not. For the results of the games, use [g\_minigames](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_minigames).

**Joins:**

* m\_game\_name → [dm\_saw\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_saw_template) (saw\_template\_id)
* minigame\_attempt\_status → [lookup\_minigame\_attempt\_status](#text-of-value-ids) (id)

| Column                       | Type    | Description                                                                     |
| ---------------------------- | ------- | ------------------------------------------------------------------------------- |
| m\_game\_name                | INT64   | ID of the mini-game template                                                    |
| minigame\_attempt\_status    | INT64   | Result of the attempt. ID of a value; text in lookup\_minigame\_attempt\_status |
| minigame\_attempt\_round\_id | NUMERIC | MatchX only: ID of the round                                                    |

### dwh\_ext\_xxx.tr\_minigame\_win

A player won a prize in a mini-game. One row per prize.

**Joins:**

* m\_game\_name, m\_last\_game\_name → [dm\_saw\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_saw_template) (saw\_template\_id)
* m\_prize\_name → [dm\_saw\_prize](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_saw_prize) (saw\_prize\_id)

| Column                   | Type  | Description                                                                                    |
| ------------------------ | ----- | ---------------------------------------------------------------------------------------------- |
| m\_game\_name            | INT64 | ID of the mini-game template                                                                   |
| m\_prize\_name           | INT64 | ID of the prize                                                                                |
| m\_game\_prize\_type     | INT64 | Type of the prize. Same values as prize\_type\_id in dm\_saw\_prize                            |
| m\_prize\_int\_parameter | INT64 | ID of the prize (the same value as m\_prize\_name)                                             |
| m\_last\_game\_name      | INT64 | ID of the mini-game template the player played last, of any type including MatchX. Often empty |

### dwh\_ext\_xxx.tr\_minigame\_spins\_issued

A player got spins (attempts) for a mini-game. One row per grant.

**Joins:**

* m\_game\_name → [dm\_saw\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_saw_template) (saw\_template\_id)
* minigame\_issued\_spins\_source → [lookup\_minigame\_issued\_spins\_source](#text-of-value-ids) (id)

| Column                          | Type    | Description                                                                         |
| ------------------------------- | ------- | ----------------------------------------------------------------------------------- |
| m\_game\_name                   | INT64   | ID of the mini-game template                                                        |
| minigame\_spins\_count          | NUMERIC | Number of spins given                                                               |
| minigame\_issued\_spins\_source | INT64   | Source of the spins. ID of a value; text in lookup\_minigame\_issued\_spins\_source |

### dwh\_ext\_xxx.tr\_minigame\_matchx\_prediction

A player made a prediction in a MatchX game. One row per prediction.

**Joins:**

* m\_game\_name → [dm\_saw\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_saw_template) (saw\_template\_id)
* minigame\_attempt\_status → [lookup\_minigame\_attempt\_status](#text-of-value-ids) (id)

| Column                       | Type    | Description                                                                     |
| ---------------------------- | ------- | ------------------------------------------------------------------------------- |
| m\_game\_name                | INT64   | ID of the mini-game template                                                    |
| minigame\_attempt\_round\_id | NUMERIC | ID of the MatchX round                                                          |
| minigame\_attempt\_status    | INT64   | Result of the attempt. ID of a value; text in lookup\_minigame\_attempt\_status |

## Tournaments

The column **tournament\_name** holds the ID of the tournament, not its name. It joins to [dm\_tournament](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_tournament) (id), not to dm\_tournament\_instance. For the results of each tournament run, use [g\_tournament\_winners](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_tournament_winners) and [g\_tournament\_analytics](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.g_tournament_analytics).

### dwh\_ext\_xxx.tr\_tournament\_user\_registered

A player registered in a tournament. One row per registration.

**Joins:**

* tournament\_name → [dm\_tournament](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_tournament) (id)

| Column           | Type  | Description          |
| ---------------- | ----- | -------------------- |
| tournament\_name | INT64 | ID of the tournament |

### dwh\_ext\_xxx.tr\_tournament\_win

A player finished a tournament in a prize place. One row per player and tournament run.

**Joins:**

* tournament\_name → [dm\_tournament](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_tournament) (id)

| Column                     | Type    | Description                     |
| -------------------------- | ------- | ------------------------------- |
| tournament\_name           | INT64   | ID of the tournament            |
| tournament\_winning\_place | NUMERIC | Place of the player (1 = first) |
| tournament\_winning\_prize | INT64   | ID of the prize of that place   |

### dwh\_ext\_xxx.tr\_tournament\_lose

A player finished a tournament without a prize. One row per player and tournament run.

**Joins:**

* tournament\_name → [dm\_tournament](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_tournament) (id)

| Column           | Type  | Description          |
| ---------------- | ----- | -------------------- |
| tournament\_name | INT64 | ID of the tournament |

## Raffles & Jackpots

In the raffle views, **raffle\_name** holds the ID of the raffle and joins to [dm\_raffle](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_raffle) (raffle\_id). **raffle\_draw\_name** holds the ID of the draw (draw\_id in [raf\_won\_prizes](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.raf_won_prizes)). For tickets and prizes, use [raf\_tickets](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.raf_tickets) and raf\_won\_prizes.

### dwh\_ext\_xxx.tr\_raffle\_tickets\_given

A player got raffle tickets. One row per grant.

| Column       | Type  | Description      |
| ------------ | ----- | ---------------- |
| raffle\_name | INT64 | ID of the raffle |

### dwh\_ext\_xxx.tr\_raffle\_draw\_run\_opt\_in

A player opted in to a run of a raffle draw. One row per player and run. Players can opt in only when the draw requires it, and then only the tickets of players who opted in take part in the run. A recurring draw starts a new run each time and the player must opt in again, so one player can have several rows for the same draw.

A row is created only when the opt-in succeeds. There is no row when:

* the player had already opted in to that run
* the run was already drawn
* the player is in the control group
* the draw does not require opt-in

The view does not hold the ID of the run. To link opt-ins to prizes, match raffle\_name, raffle\_draw\_name and user\_id to raffle\_id, draw\_id and user\_id in [raf\_won\_prizes](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.raf_won_prizes).

**Joins:**

* raffle\_name → [dm\_raffle](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_raffle) (raffle\_id)
* raffle\_draw\_name → [raf\_won\_prizes](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.raf_won_prizes) (draw\_id)
* user\_id → [j\_user\_no\_enums](https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse.md#query-for-user-profile-details) (user\_id)

| Column                     | Type      | Description                                                                                                                                                                        |
| -------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| event\_time                | TIMESTAMP | Time of the opt-in (UTC). The view is partitioned by this column, always filter on it                                                                                              |
| ingest\_time               | TIMESTAMP | Time when the event was stored in Smartico, usually a few seconds after event\_time                                                                                                |
| label\_id                  | INT64     | Label ID                                                                                                                                                                           |
| user\_id                   | INT64     | Smartico ID of the player who opted in. Joins to [j\_user\_no\_enums](https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse.md#query-for-user-profile-details) |
| event\_id                  | INT64     | ID of the event in Smartico. Unique per row, use it to remove duplicates                                                                                                           |
| raffle\_name               | INT64     | ID of the raffle, not its name. The name is internal\_name in dm\_raffle                                                                                                           |
| raffle\_draw\_name         | INT64     | ID of the draw, not its name. The names of draws are not in the DWH                                                                                                                |
| user\_to\_label\_cur\_rate | NUMERIC   | Rate from the player's currency to the label currency. An opt-in has no amount, so the column is not needed here. It holds 1 or is empty                                           |

Opt-ins and players per raffle and draw in the last 30 days

```sql
SELECT R.internal_name AS raffle,
       O.raffle_draw_name AS draw_id,
       COUNT(*) AS opt_ins,
       COUNT(DISTINCT O.user_id) AS players
FROM dwh_ext_xxx.tr_raffle_draw_run_opt_in O
LEFT JOIN dwh_ext_xxx.dm_raffle R ON R.raffle_id = O.raffle_name
WHERE O.event_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
GROUP BY raffle, draw_id
ORDER BY opt_ins DESC
```

### dwh\_ext\_xxx.tr\_raffle\_draw\_won

A player won a prize in a raffle draw. One row per prize.

| Column             | Type  | Description      |
| ------------------ | ----- | ---------------- |
| raffle\_name       | INT64 | ID of the raffle |
| raffle\_draw\_name | INT64 | ID of the draw   |

### dwh\_ext\_xxx.tr\_raffle\_prize\_claimed

A player claimed a raffle prize that needs claiming. One row per claim.

| Column             | Type  | Description      |
| ------------------ | ----- | ---------------- |
| raffle\_name       | INT64 | ID of the raffle |
| raffle\_draw\_name | INT64 | ID of the draw   |

### dwh\_ext\_xxx.tr\_jackpot\_opt\_in

A player opted in to a jackpot. One row per opt-in. For the bets and contributions, use [jp\_bet](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.jp_bet).

**Joins:**

* jackpot\_template → [dm\_jp\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_jp_template) (jp\_template\_id)

| Column            | Type    | Description                |
| ----------------- | ------- | -------------------------- |
| jackpot\_template | NUMERIC | ID of the jackpot template |

### dwh\_ext\_xxx.tr\_jackpot\_user\_win

A player won a jackpot. One row per win.

**Joins:**

* jackpot\_template → [dm\_jp\_template](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_jp_template) (jp\_template\_id)

| Column            | Type    | Description                                |
| ----------------- | ------- | ------------------------------------------ |
| jackpot\_template | NUMERIC | ID of the jackpot template                 |
| jackpot\_amount   | NUMERIC | Amount won, in the currency of the jackpot |
| jackpot\_currency | STRING  | Currency of the jackpot                    |

Jackpot wins of the last 30 days, with the jackpot name

```sql
SELECT W.event_time, W.user_id, J.internal_name, W.jackpot_amount, W.jackpot_currency
FROM dwh_ext_xxx.tr_jackpot_user_win W
INNER JOIN dwh_ext_xxx.dm_jp_template J ON J.jp_template_id = CAST(W.jackpot_template AS INT64)
WHERE W.event_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
ORDER BY W.event_time DESC
```

## Clans

### dwh\_ext\_xxx.tr\_core\_clan\_joined

A player joined a clan. One row per join.

**Joins:**

* core\_clan\_id → [dm\_ach\_clans](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_ach_clans) (clan\_id). Cast the column to INT64 for the join

| Column                                     | Type    | Description                                                                                                                 |
| ------------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| core\_clan\_id                             | NUMERIC | ID of the clan the player joined                                                                                            |
| core\_clan\_join\_source\_id               | INT64   | How the player joined: 1 = Campaign, 6 = Manual, 12 = Automation Rule, 23 = Clans UI (the player joined in the clan screen) |
| core\_clan\_entry\_fee\_currency\_type\_id | INT64   | What the entry fee was paid in: 0 = Points, 1 = Gems, 2 = Diamonds, 3 = Free                                                |
| core\_clan\_entry\_fee\_amount             | NUMERIC | Entry fee amount                                                                                                            |
| core\_clan\_is\_switched                   | BOOL    | TRUE when the player moved from another clan. Empty when the player had no clan before                                      |

### dwh\_ext\_xxx.tr\_core\_clan\_kicked\_out

A player left a clan: the operator or the system removed the player, the player left, or the player moved to another clan. One row per exit.

**Joins:**

* core\_clan\_kicked\_out\_id → [dm\_ach\_clans](https://help.smartico.ai/pages/PVn4StbDnSBjvWx8XTTk#dwh_ext_xxx.dm_ach_clans) (clan\_id)

| Column                      | Type    | Description                                                                                                  |
| --------------------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| core\_clan\_kicked\_out\_id | INT64   | ID of the clan the player left                                                                               |
| core\_clan\_is\_kicked      | BOOL    | TRUE when the operator or the system removed the player. Empty when the player left or moved to another clan |
| core\_clan\_id              | NUMERIC | Clan of the player at the moment of this event: 0 = no clan                                                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.smartico.ai/welcome/technical-guides/smartico-data-warehouse/smartico-dwh-transactional-views-gamification.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
