| SELECT |
| * |
| FROM ( |
| SELECT |
| repo_name, |
| lang.name AS language_name |
| FROM |
| `bigquery-public-data.github_repos.languages` AS lang_table, |
| UNNEST(LANGUAGE) AS lang) lang_table |
| JOIN |
| `bigquery-public-data.github_repos.licenses` AS license_table |
| ON |
| license_table.repo_name = lang_table.repo_name |
| JOIN ( |
| SELECT |
| * |
| FROM |
| `bigquery-public-data.github_repos.commits` AS commits_table, |
| UNNEST(repo_name) AS unnested_repo_name) commits_table |
| ON |
| commits_table.unnested_repo_name = lang_table.repo_name |
| WHERE |
| ((license_table.license LIKE 'mit') |
| OR (license_table.license LIKE 'artistic-2.0') |
| OR (license_table.license LIKE 'isc') |
| OR (license_table.license LIKE 'cc0-1.0') |
| OR (license_table.license LIKE 'apache-2.0') |
| OR (license_table.license LIKE 'unlicense') |
| OR (license_table.license LIKE 'bsd-3-clause') |
| OR (license_table.license LIKE 'bsd-2-clause')); |