diff --git a/docs/tables/github_pull_request.md b/docs/tables/github_pull_request.md index 4690e4f..28f1bdd 100644 --- a/docs/tables/github_pull_request.md +++ b/docs/tables/github_pull_request.md @@ -253,4 +253,33 @@ where and state = 'OPEN' group by repository_full_name, number, title; -``` \ No newline at end of file +``` + +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'; +```