There are N tables with the same structure, consisting of three columns: “datetime“, ”symbol“, and ”faN“.
I store these tables in a dictionary named datadict, where the keys match the names in the third column of each table “fa1”, “fa2”, ..., “faN”, and the values are these tables.
I want to calculate the weighted sum of the third columns from all these tables, where the weights are a vector of length N. What’s the most convenient way to achieve this in DolphinDB?

Refer to the following script: