table1:
cust_name 客户名称
order_date 订单日期
acount 订单金额table2:
cust_name 客户名称
rank 客户等级查出2006年各个月份各个客户等级的订单总金额请问高手这个SQL语句怎么写呢?请指教
cust_name 客户名称
order_date 订单日期
acount 订单金额table2:
cust_name 客户名称
rank 客户等级查出2006年各个月份各个客户等级的订单总金额请问高手这个SQL语句怎么写呢?请指教
from table1,table2
where table1.cust_name = table2.cust_name
group by convert(varchar(7),order_date,120) , rank
from table1,table2
where table1.cust_name = table2.cust_name
group by convert(varchar(7),order_date,120) , rank