- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
数据库电子版作业
1、select * from Products
where ProductName like %en or ProductName like %ton
2、select top 5 * from Products
where UnitPrice between 15 and 25
order by NEWID()
3、select CustomerID,City from Customers
where Country=USA
4、select * from Suppliers
where PostalCode like [A-Z]% and Fax is not null
5、select ReportsTo from Employees
where Title=Sales Representative
6、select * from Orders
where ShippedDate2009-6-30 and RequiredDateShippedDate
7、select CategoryID,AVG(UnitPrice) as avg from Products
group by CategoryID
having AVG(UnitPrice)20
8、select SupplierID,CategoryID,AVG(UnitPrice) from Products
group by SupplierID,CategoryID
order by SupplierID,CategoryID
9、select SupplierID,COUNT(UnitPrice) from Products
where UnitPrice 20
group by SupplierID
10、select CustomerID,month(OrderDate) as month,COUNT(OrderID) from Orders
where OrderDate between 2009-1-1 and 2009-12-31
group by CustomerID,month(OrderDate)
11、select a.productid,count(a.OrderID),SUM(amount) from OrderItems as a
inner join Orders as b on a.OrderID=b.OrderID
where year(b.OrderDate)=2009
group by a.ProductID
order by a.ProductID
12、select a.employeeid,a.lastname+ +a.FirstName as fullname,SUM(c.Amount) as sum from Employees as a
inner join Orders as b on a.EmployeeID=b.EmployeeID
inner join OrderItems as c on b.OrderID=c.OrderID
group by a.EmployeeID,a.lastname+ +a.FirstName
having SUM(c.Amount)1500000
13、select * from Products
where CategoryID=(select CategoryID from Products where ProductName=tofu)
and UnitPrice(select 2*UnitPrice from Products where ProductName=tofu)
14、select CategoryID,AVG(UnitPrice) from Products
group by CategoryID
having AVG(UnitPrice)
(select AVG(a.UnitPrice) from Products as a
inner join Categories as b on a.CategoryID=b.CategoryID
where b.CategoryName=Beverages)
15、select CustomerID,COUNT(OrderID) from Orders
group by CustomerID
having COUNT(OrderID)20
order by customerid
16、select CustomerID,COUNT(OrderID) as num into temb from Orders
group by CustomerID
select * from temb where num=(sel
您可能关注的文档
最近下载
- 电力隧道电力隧道工程c标段施工方案.doc VIP
- 九年级物理第21章《信息的传递》全章课件.ppt VIP
- Unit 4 Fun with numbers(Get ready)外研版(三起)(2024)英语三年级上册.pptx VIP
- (妇产科)子宫内膜癌教学查房.pptx
- 供应商审核报告范文模板.docx VIP
- 机场行测考试题库.pdf VIP
- 2025年《网络设备配置与安全》课程标准.docx VIP
- 成都市盐道街中学高一入学语文分班考试真题含答案.docx VIP
- 成都市盐道街外国语2025高一入学英语分班考试真题含答案.docx VIP
- 成都市盐道街外国语2025高一入学数学分班考试真题含答案.docx VIP
文档评论(0)