SELECT Country,sum(Amount) '商品数量' FROM products GROUP BY Country
DEMO示例 源代码
汇集 DEMO示例 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
SELECT ProductName,Amount,price,total FROM products COMPUTE sum(total)
USE MyComplany GO SELECT Country, sum(Total) '价格总额' FROM products GROUP BY Country HAVING sum(Total)>1000
SELECT count(*) '记录数目' FROM Products
SELECT Name,Numb,Class FROM student EXCEPT SELECT Name,Numb,Class FROM newstudent ORDER BY Numb
SELECT Name,Numb,Class FROM student INTERSECT SELECT Name,Numb,Class FROM newstudent
SELECT sum(total) '商品总额' FROM Products SELECT sum(price*amount) '商品总额' FROM Products
SELECT count(DISTINCT Country) '不同的国家数目' FROM Products
SELECT ProductName,Amount,price,total,Country FROM products ORDER BY Country COMPUTE sum(total)BY Country
USE sampledb SELECT Name,Numb FROM student UNION SELECT Name,Numb FROM newstudent