You mean you will get the list of Company names in one table that you will query like
SELECT Distinct Company From CompanyTable;
Then you have to fetch other table based on the company from the above query result like below?
For i=0 to NoOfRows('CompanyTable')-1
vCompany = Peek('Company',$(i),CompanyTable);