SQL的问题,高分在线等答案,答对了再追加分

数据查询在数据库Pubs中查询:1)在authors表中查询:所有的作者id(au_id)号和作者的姓(au_lname)名(au_fname)和所在的城市(city)。... 数据查询

在数据库Pubs中查询:

1)在authors表中查询:所有的作者id(au_id)号和作者的姓(au_lname)名(au_fname)和所在的城市(city)。

2)在titles表中查询:显示titles表中的所有信息。

3)在authors表中查询出所有state为‘CA’的作者的姓(au_lname)名(au_fname)和所在的城市(city)。

4)在authors表中查询出所有au_fname以字母‘A’开头的作者的全部信息。

5)在authors表中查询出所有au_fname中第二个字母是‘e’的作者的全部信息。

6)在authors表中查询出所有au_fname中包含字母‘o’或字母‘e’的作者的全部信息。

7)在authors表中查询出所有au_fname以字母‘M’开头,且第二个字母不是‘i’的作者的全部信息。

在数据库Northwind中查询:

8) 在OrderDetails表中查询:全部的订单号(orderID)、产品ID(productID)、产品单价(UnitPrice)和订货数量(quantity),并计算产品的总价(使用计算列)。

9)在customers表中查询:客户的公司名称(companyName)、联系人名称(contactName),以及公司所在的国家(country)和城市(city)的名字(要求使用+’,’+来显示结果)。

10) 在customers表中查询:客户ID(customerID)、联系人名称(contactName)和联系人的头衔(contactTitle),并使用说明列’The contactor’s title is: ’。

11) 在OrderDetails表中查询:全部的订单号(orderID)、产品ID(productID)、产品单价(UnitPrice)和订货数量(quantity),并计算产品的总价(使用计算列并指定列标题‘总价’)。

12) 在customers表中查询:显示客户的信息,格式如下(使用AS改变列标题):
公司名称 联系人 地址 电话号码

13)在products表中查询:满足价格(unitprice)在20~40元之间的产品的产品ID(productID),产品名称(productName),单价(unitprice)和库存量(unitsinstock)。
在2个 小时内 给出答案,请给出题号,我在线等答案
展开
 我来答
八__八
2008-11-22 · 超过77用户采纳过TA的回答
知道小有建树答主
回答量:470
采纳率:0%
帮助的人:157万
展开全部
1.select au_id,au_lname,au_fname,city from authors;
2.select * from titles;
3.select au_lname,au_fname,city from authors where state='CA';
4.select * from authors where au_fname like 'A%';
5.select * from authors where au_fname like '_e%';
6.select * from authors where au_fname like '%o%' or '%e%';
7.select * from authors where au_fname like '[M^_i]%';
8.select orderID,productID,UnitPrice,quantity,sum(UnitPrice*quantity) from OrderDetails group by orderID,productID,UnitPrice,quantity;
9.没理解(要求使用+’,’+来显示结果)。
10.select customerID,contactName,contactTitle as The contactor's title is: from customers;
11.select orderID,productID,UnitPrice,quantity,sum(UnitPrice*quantity) as 总价 from OrderDetails group by orderID,productID,UnitPrice,quantity;
12.select companyName as 公司名称,contactName as 联系人,address as 地址,phone as 电话号码 from customers;
13.select productID,productName,unitprice,unitsinstock from products where unitprice between 20 and 40;
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
zhongduan
2008-11-22
知道答主
回答量:14
采纳率:0%
帮助的人:19.9万
展开全部
1. select au_id,au_lname+' '+au_fname as name,city from authors
2. select * from titles
3. select au_lname+' '+au_fname as name,city from authors where state='CA'
4. select * from authors where au_fname like 'A%'
5. select * from authors where au_fname like '_e%'
6. select * from authors where au_fname like '%[oe]%'
7. select * from authors where au_fname like 'M[^i]%'
8. select orderid,productid,UnitPrice,quantity,unitPrice*quantity as PruductAmount from OrderDetails
9. select companyName,ContactName,country+','+city as city from customers
10. select companyName,ContactName,'The contactor''s title is:'+contactTitle as title from customers
11. select orderid,productid,UnitPrice,quantity,unitPrice*quantity as 总价 from OrderDetails
12. select companyname as 公司名称,ContactName as 联系人,companyAddress as 地址,companyphone as 电话 from costomers
13. select productID,productName,unitprice,unitsinstock from products where unitprice between 20 and 40
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
qianthinkover
2008-11-22 · TA获得超过451个赞
知道小有建树答主
回答量:532
采纳率:0%
帮助的人:399万
展开全部
select au_id,au_lname,au_fname,city from author
select * from title
select au_id,au_lname,au_fname,city from author where state='CA'
select * from author where au_fname like 'A%'
select * from author where au_fname like '_e%'
select * from author where au_fname like '%e' or like '%o'
select * from author where au_fname like 'M%'
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
百度网友6cf810b68
2008-11-22 · TA获得超过946个赞
知道大有可为答主
回答量:1403
采纳率:0%
帮助的人:1629万
展开全部
狂汗.楼上那个.不要全抄好不好...
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式