Created
April 30, 2024 16:55
-
-
Save lfy79001/56c5025a31e4f5d76efd7636353988a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
my_drug_list ARRAY<STRING>; | |
SET | |
my_drug_list = [ 'Premarin', | |
'Calcium disodium versenate', | |
'Keytruda', | |
'Vioxx', | |
'Humira' ]; | |
SELECT | |
id AS drug_id, | |
name AS drug_chembl_name, | |
tradeNameList.element AS drug_trade_name, | |
drugType AS drug_type, | |
isApproved AS drug_is_approved, | |
blackBoxWarning AS drug_blackbox_warning, | |
hasBeenWithdrawn AS drug_withdrawn, | |
FROM | |
`open-targets-prod.platform.molecule`, | |
UNNEST (tradeNames.list) AS tradeNameList | |
WHERE | |
(tradeNameList.element) IN UNNEST(my_drug_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment