# open_join_requests

## Description

VIEW

<details>
<summary><strong>Table Definition</strong></summary>

```sql
CREATE VIEW open_join_requests AS (select `jrh`.`join_request_event_id` AS `join_request_event_id`,`jrh`.`join_response_event_id` AS `join_response_event_id`,`jrh`.`actor_user_id` AS `actor_user_id`,`jrh`.`created_at` AS `created_at`,`jrd`.`responder_user_id` AS `responder_user_id`,`jrd`.`organization_id` AS `organization_id` from (`s25101270_countmein`.`join_requests_history` `jrh` join `s25101270_countmein`.`join_response_details` `jrd` on(`jrh`.`join_response_event_id` = `jrd`.`join_response_event_id`)) where `jrh`.`status` = 'open' and `jrh`.`created_at` = (select max(`jrh2`.`created_at`) from (`s25101270_countmein`.`join_requests_history` `jrh2` join `s25101270_countmein`.`join_response_details` `jrd2` on(`jrh2`.`join_response_event_id` = `jrd2`.`join_response_event_id`)) where `jrd2`.`responder_user_id` = `jrd`.`responder_user_id` and `jrd2`.`organization_id` = `jrd`.`organization_id`))
```

</details>

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| join_request_event_id | bigint(20) | 0 | false |  |  |  |
| join_response_event_id | bigint(20) |  | false |  |  |  |
| actor_user_id | bigint(20) | NULL | true |  |  |  |
| created_at | datetime(6) |  | false |  |  |  |
| responder_user_id | bigint(20) |  | false |  |  |  |
| organization_id | bigint(20) |  | false |  |  |  |

## Referenced Tables

| Name | Columns | Comment | Type |
| ---- | ------- | ------- | ---- |
| [join_requests_history](join_requests_history.md) | 5 |  | BASE TABLE |
| [join_response_details](join_response_details.md) | 9 | VIEW | VIEW |

## Relations

![er](open_join_requests.svg)

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
