The concept here is to have a ‘database query’ version of ‘column list loop’, in particular with a ‘loop end’ that supports column append. The idea would be to build up a series of embedded SQL select statements that have the effect of producing a single query that will add multiple columns to an existing table based on the columns in that table.
One use case for this would be to prepare a large table for predictive modelling - so, for example, filling nulls or calculating rolling sums as database queries. This can be achieved now using a regular column loop and then iteratively writing old and new columns to a temporary table, dropping the old table, renaming the temp version as the existing table, then restarting the loop and re-selecting the table - but it is a relatively slow process. Being able to do all this at the SQL level and then subsequently build the required table with a single statement would be an enormous efficiency gain.