Hi,
I have a table with the following fields;
BANK, MARKET, AMOUNT, TRANSACTIONS, TRANSPERCENTAGE
I would like to calculate the the percentage for each market, grouped by bank.
For example,
I would like to know, for the AIMBANK group, what the percentage of transactions are for each market. Then for the BANK OF AMERICA group, the percentage of transactions for each market in that group.
Any way to do this in SQL 2000?
Thanks in advance!
I have a table with the following fields;
BANK, MARKET, AMOUNT, TRANSACTIONS, TRANSPERCENTAGE
I would like to calculate the the percentage for each market, grouped by bank.
For example,
Code:
create table #temp3 (bank varchar(75), market varchar(50), amount money, Transactions decimal(18,2), TransPercentage decimal(4,2))
go
insert into #temp3 values('AIMBANK', 'OTHER', 720712.5000, 3.00, NULL)
insert into #temp3 values('AIMBANK', 'SERVICE TITLE', 854827.000, 6.00, NULL)
insert into #temp3 values('AIMBANK', 'TITLE ONE', 172000.5000, 3.00, NULL)
insert into #temp3 values('AIMBANK', 'WESTERN TITLE', 439000.0000, 5.00, NULL)
insert into #temp3 values('BANK OF AMERICA', 'OTHER', 200500.0000, 2.00, NULL)
insert into #temp3 values('BANK OF AMERICA', 'SERVICE TITLE', 130500.0000, 1.00, NULL)
insert into #temp3 values('BANK OF AMERICA', 'WESTERN', 569000.0000, 3.00, NULL)
I would like to know, for the AIMBANK group, what the percentage of transactions are for each market. Then for the BANK OF AMERICA group, the percentage of transactions for each market in that group.
Any way to do this in SQL 2000?
Thanks in advance!