update chance set saleprice=(select price from product where name='name2') where productId=(select productId from product where name='name2');
select clientName,sum(saleprice*count) as totalSale from chance group by clientname;
select clientName from chance group by clientname having sum(saleprice*count)=(select max(totalSale) from (select sum(saleprice*count) as totalSale from chance group by clientname));
select clientName,sum(saleprice*count) as totalSale from chance group by clientname;
select clientName from chance group by clientname having sum(saleprice*count)=(select max(totalSale) from (select sum(saleprice*count) as totalSale from chance group by clientname));