I'm new to sql. I have to select top 3 companies who have the highest sells
Company Table: CompanyId, Compnayname,etc
Orders Table: OrderId, companyId,price,etc
select top 3 companyname , (select sum(price) from ordes) as Maximum from company order by Maximum Desc?
I think i need to join these but i cant find a way around it