'How to divide all columns by one column in BigQuery

Is it possible to divide all columns in a table by one of them? There are 168 of them so I'd rather not write column2/column1, column3/column1, etc.



Solution 1:[1]

As Suggested by @Aishwary, you can write a script to get the list of columns using INFORMATION_SCHEMA and then iterate over the list of columns to get the desired result.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1