Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github_pull_request.md #425

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion docs/tables/github_pull_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,4 +253,33 @@ where
and state = 'OPEN'
group by
repository_full_name, number, title;
```
```

OR

```sql+postgres
select
number,
created_at,
array(select jsonb_object_keys(labels)) as labels
from
github_pull_request
where
state = 'OPEN'
and repository_full_name = 'turbot/steampipe';
```

```sql+sqlite
select
number,
created_at,
(
select group_concat(key)
from json_each(labels)
) as labels
from
github_pull_request
where
state = 'OPEN'
and repository_full_name = 'turbot/steampipe';
```
Loading