Skip to content

Instantly share code, notes, and snippets.

@lfy79001
Created May 28, 2024 03:57
Show Gist options
  • Save lfy79001/e62c34ace839fa64e18e5c081b40a96c to your computer and use it in GitHub Desktop.
Save lfy79001/e62c34ace839fa64e18e5c081b40a96c to your computer and use it in GitHub Desktop.
SELECT
file.project_short_name,
file.data_category,
file.data_type,
file.data_format,
COUNT(file.file_gdc_id) as n
FROM
`isb-cgc-bq.GDC_case_file_metadata.fileData_active_current` AS file
WHERE
associated_entities__case_gdc_id IN ('{case_ids}')
GROUP BY
file.project_short_name,
file.data_category,
file.data_type,
file.data_format
ORDER BY file.data_type, n DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment