> Hmm..almost forgot.....
>
> Now how would I turn this into an update statement based on the
> previous query?
>
update what? A CTE comes to mind but maybe
update product p set some=thing
where p.productid = m.productid
from (select p.productid,max(o.orderdate)
from product p join orderitem t on p.productid = t.orderitems2productid
join order o on t.orderitems2orderid = o.orderid
group by p.productid
having max(o.orderdate < 'January 1 2021') as m