I have a function called generate_table, that takes 2 input parameters (rundate::date and branch::varchar)
rundate::date
branch::varchar
Now I am trying to work on a second
select generate_table(max(rundate) as rundate, branch) from t_index_of_imported_files group by branch