Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
select t1.Product
, t1.Percent
from daTable as t1
inner
join daTable as t2
on t1.Product = t2.Product
and t1.Percent < t2.Percent
group
by t1.Product
, t1.Percent
having count(*) < 3
select CustName
, ProdId
, WhseID
, sum(Percent) as TotalPercent
from (
select t1.CustName
, t1.ProdId
, t1.WhseID
, t1.Percent
from Customers as t1
inner
join Customers as t2
on t1.CustName = t2.CustName
and t1.ProdId = t2.ProdId
and t1.WhseID = t2.WhseID
and t1.Percent < t2.Percent
group
by t1.CustName
, t1.ProdId
, t1.WhseID
, t1.Percent
having count(*) < 3
) as data
group
by CustName
, ProdId
, WhseID
having sum(Percent) >= 75