select c.Cust_id, Customer_Name, round(sum(Sales)) as Total_Sales
from market_fact_full m
inner join cust_dimen c using (Cust_id)
group by c.Cust_id
order by Sales desc;
Also when I add all non aggregated cols I still get the error:
select c.Cust_id, Customer_Name, round(sum(Sales)) as Total_Sales
from market_fact_full m
inner join cust_dimen c using (Cust_id)
group by c.Cust_id, Customer_Name
order by Sales desc;
Error Code: 1055. Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'market_star_schema.m.Sales' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by