Skip to content

Instantly share code, notes, and snippets.

@lfy79001
Created April 30, 2024 16:54
Show Gist options
  • Save lfy79001/19f49c1a128cfd1f5b2392dd2ab08fb9 to your computer and use it in GitHub Desktop.
Save lfy79001/19f49c1a128cfd1f5b2392dd2ab08fb9 to your computer and use it in GitHub Desktop.
SELECT
associations.targetId AS target_id,
targets.approvedSymbol AS target_approved_symbol,
associations.diseaseId AS disease_id,
diseases.name AS disease_name,
associations.score AS overall_association_score
FROM
`open-targets-prod.platform.associationByOverallDirect` AS associations
JOIN
`open-targets-prod.platform.diseases` AS diseases
ON
associations.diseaseId = diseases.id
JOIN
`open-targets-prod.platform.targets` AS targets
ON
associations.targetId = targets.id
WHERE
associations.diseaseId='EFO_0000676'
ORDER BY
associations.score DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment