select customers.姓名 as 客户名,count(*) as 订单数 from customers join orders;
on customers.客户号=orders.客户号 where year(orders.签订日期)=2007;
group by customers.姓名 order by 2 desc,customers.姓名 into tabletwo.dbf
select customers.姓名 as 客户名,count(*) as 订单数 from customers join orders;
on customers.客户号=orders.客户号 where year(orders.签订日期)=2007;
group by customers.姓名 order by 2 desc,customers.姓名 into table two.dbf
select customers.姓名 as 客户名,count(*) as 订单数 from customers join orders;
on customers.客户号=orders.客户号 where year(orders.签订日期)=2007;
group by customers.姓名 order by 2 desc,customers.姓名 into tabletwo.dbf
试试:
select customers.姓名 as 客户名,count(*) as 订单数 from customers join orders;
on customers.客户号=orders.客户号 where year(orders.签订日期)=2007;
group by customers.客户名 order by 2 desc,customers.客户名 into table two.dbf
select customers.姓名 as 客户名,count(*) as 订单数 from customers join orders;
on customers.客户号=orders.客户号 where year(orders.签订日期)=2007;
group by customers.姓名 order by 2 desc,customers.姓名 into tabletwo.dbf