select orders.orderid,order_details.productid,products.productname,order_details.unitprice,order_details.quantity,order_details.unitprice*order_details.quantityas Total
from order_details,orders,products
where orders.orderid=order_details.orderid
And Products.productID=order_details.productID
and order_details.orderid in (
select orderid from Order_details group by orderid having count( distinct productid)<3
)Order Details 用 [Order Details]
from order_details,orders,products
where orders.orderid=order_details.orderid
And Products.productID=order_details.productID
and order_details.orderid in (
select orderid from Order_details group by orderid having count( distinct productid)<3
)Order Details 用 [Order Details]
from order_details,orders,products,customers
where orders.orderid=order_details.orderid
And Products.productID=order_details.productID
and Orders.customerid=customers.customerid
and order_details.orderid in (
select orderid from Order_details group by orderid having count( distinct productid)<3)
order by orders.orderid