Q:

"Group By" failing - ORACLE

I found a dozen or so different threads that were similar to my question, but I didn't see any that addressed what I am experiencing.  I have three databases that keep track of customer/sale transactions.  I can join them and get the individual transactions I am looking for without a problem, but when I try to group the results by vendor_name, I get "ORA-00979: not a GROUP BY expression", although vendor_name is one of the columns I am selecting (which I thought was the pre-requisite).  Am I overlooking something real simple here?
select tran_date,product_name,quantity,
       product_price,vendor_name,quantity*product_price as total  
from transactions
 join products using(product_num) 
  join customers using(vendor_id) group by vendor_name;

A:

"Grouping by" vendor name means that you are trying to get one record per vendor name. So, you need to specify how the other columns should be grouped/aggregated.
For example "quantity*product_price", being a number, part of what you need would be
select vendor_name, sum(quantity*product_price)
from transactions
 join products using(product_num) 
  join customers using(vendor_id) 
group by vendor_name;

The full answer to your question depends on How you want the other columns to be grouped for a given vendor name.

