97213529 郭益銘发表的博客

97213529 郭益銘的头像
97213529 郭益銘 发表于 2008年12月2日 星期二 16:36
世界上的任何人

Select Store.Sales_Region, dog from

(Select Store.Sales_Region, SUM(Total) as dog from

(SELECT  Sale.Store_No, SUM(Sale.Units_Sold* Item.Unit_Price) as Total

from Sale, Item

where Sale.Item_No = Item.Item_No group by Sale.Store_No) , Store

where Sale.Store_No = Store.Store_No

group by Store.Sales_Region)

where dog =

(Select Max(dog) from
(Select Store.Sales_Region, SUM(Total) as dog from
(SELECT  Sale.Store_No, SUM(Sale.Units_Sold* Item.Unit_Price) as Total

from Sale, Item

where Sale.Item_No = Item.Item_No group by Sale.Store_No) , Store

where Sale.Store_No = Store.Store_No

group by Store.Sales_Region))
标签:
 

  
RSS