Starting with a table like this
WITH table AS (
SELECT 1001 as ID, 1 As Color_blue, 0 AS Color_red, 0 AS Color_black UNION ALL
SELECT 1002 as ID, 0 As Color_blue, 0 AS Color_red, 1 AS Color_black UNION ALL
SELECT 1003 as ID, 0 As Color_blue, 1 AS Color_red, 0 AS Color_black UNION ALL
SELECT 1004 as ID, 0 As Color_blue, 0 AS Color_red, 1 AS Color_black )
SELECT *
FROM table
I want to aggregate all the features columns and build an array as following:
select ID, array<float64>[Color_blue, Color_red, Color_black] features
from table
However, I want to include all the columns names dynamically without hard coding them in my query. The output should stay the same. How do I create an array of floats with all the features, assuming I don't know the column names (only "ID")?

