Good day everyone. I'm hoping someone can point me in the right direction. I've been using Coldfusion for awhile, although I admit, I'm not a master at it.

I'm pulling my hair out on a project I'm hoping someone can shed some light on.

I have a table in my database that I want to group and output a report on.

It's a table tracking purchases and types of purchases.

Here's the data I'm collecting: from_name, from_company, transaction_type, and amount. I have a few other fields, but they aren't needed for this report. There are multiple transactions per person and a varying number of persons.

What I need to do is to create queries that will group by name or company, which doesn't matter, give me a count of transaction types (3 of A, 6 of B, etc.) as well as a total amount of each type, then show the total transactions count by name or company and the total amount.

I'm trying to output in a table having each row be the data from each company.

Can someone point me in the right direction to group such output, do counts on the number of records as well as show totals dollars?

Thank you so much for any advice you might have.