现有书目表book,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。A、select avg(price),type from book group by typeB、select count(price),type from book group by priceC、select avg(price),type from book group by priceD、select count(price),type from book group by type

现有书目表book,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。

  • A、select avg(price),type from book group by type
  • B、select count(price),type from book group by price
  • C、select avg(price),type from book group by price
  • D、select count(price),type from book group by type

相关考题:

查询订单数在3个以上、订单的平均金额200元以上的职员号。正确的SQL语句是A) SELECT职员号FROM订单GROUP BY职员号HAVING COUNT(*)3 AND AVG_金额200B) SELECT职员号FROM订单GROUP BY职员号日AVING COUNT(*)3 AND AVG_(金额)200C) SELECT职员号FROM订单GROUP BY职员号HAVING COUNT(*)3 WHERE AVG_(金额200D) SELECT职员号FROM订单GROUP BY职员号WHERE COUNT(*)3 AND_AVG金额200

求每个终点的平均票价的SQL语句是A)SELECT终点,avg(票价)FROM ticket GROUP BY票价B)SELECT终点,avg(票价)FROM ticket ORDER BY票价C)SELECT终点,avg(票价)FROM ticket ORDER BY终点D)SELECT终点,avg(票价)FROM ticket GROUP BY终点

假设 “ 订单 ” 表中有订单号、职员号、客户号和金额字段,正确的 SQL 语句只能是A)SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)3 AND AVG_ 金额 200B)SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)3 AND AVG( 金额 )200C)SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)3 WHERE AVG( 金额 )200D)SELECT 职员号 FROM 订单 GROUP BY 职员号 WHERE COUNT(*)3 AND AVG_ 金额 200

关于group by 以下语句正确的是( )A.SELECT store_name FROM Store_Information GROUP BY store_nameB. SELECT SUM(sales) FROM Store_Information GROUP BY salesC.SELECT store_name, price SUM(sales) FROM Store_Information GROUP BY store_name,priceD.SELECT store_name, SUM(sales) FROM Store_Information GROUP BY store_name

补全语句:select vend_id,count(*) from products where prod_price>=10 group by vend_id ____ count(*)>=2;

如果要查询所藏图书中,各个出版社图书的最高单价、平均单价和册数,所用的SQL语句是A.SELECT出版单位,MAX(单价),AVG(单价),COUNT(*); FROM 图书; GROUP BY 出版单位B.SELECT 出版单位,MAX(单价),AVG(单价),COUNT(*); FROM 图书; HAVING 出版单位C.SELECT 出版单位,MIX (单价),AVG (单价),COUNT(*); FROM 图书 GROUP BY 出版单位D.SELECT出版单位,MIN(单价),AVG(单价),COUNT(*); FROM 图书; HAVING 出版单位

查询订单数在3个以上、订单的平均金额200元以上的职员号。正确的SQL语句是A.SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)>3 AND AVG 金额>200B.SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)>3 AND AVG (金额)>200C.SELECT 职员号 FROM 订单 GROUP BY 职员号 HAVING COUNT(*)>3 WHERE AVG (金额)>200D.SELECT 职员号 FROM 订单 GROUP BY 职员号 WHERE COUNT(*)>3 AND AVG金额>200

检索最少有4名职工仓库的职工平均工资( )。A.SELECT 仓库号,COLINT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 仓库号 WHERE COUNT(*)>=4B.SELECT 仓库号,COUNT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 仓库号 HAVING COUNT(*)>=4C.SELECT 仓库号,COUNT(*) AS 人数,AVG (工资) AS 平均工资 FROM 职工; GROUP BY 职工号 WHERE COUNT(*)>=4D.SEIECT 仓库号,COUNT(*) AS 人数,AVG(工资) AS 平均工资 FROM 职工; GROUP BY 职工号 HAVING COUNT(*)>=4

求至少有两个职工的每个仓库的平均工资A.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;HAVING COUNT(*)=2B.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 HAVING COUNT(*)=2C.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 SET COUNT(*)=2D.SELECT 仓库号,COUNT(*),AVG(工资)FROM 职工表;GROUP BY 仓库号 WHERE COUNT(*)=2

检索最少有4名职工的仓库的职工平均工资( )。A)SELECT仓库号,COUNT(﹡)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY仓库号WHERE COUNT(﹡)=4B)SELECT仓库号,COUNT(﹡)AS人数,AVG(1资)AS平均工资FROM职工;GROUP BY仓库号HAVING COUNT(﹡)=4C)SELECT仓库号,COUNT(木)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY职工号WHERE COUNT(﹡)=4D)SELECT仓库号,COUNT(﹡)AS人数,AVG(工资)AS平均工资FROM职工;GROUP BY职工号HAVING COUNT(﹡)=4

下列查询语句中,错误的是()。A、SELECT Sno, COUNT(*) FROM SC GROUP BY SnoB、SELECT Sno FROM SC GROUP BY Sno WHERE COUNT(*) 3C、SELECT Sno FROM SC GROUP BY Sno HAVING COUNT(*) 3D、SELECT Sno FROM SC GROUP BY Sno

查询book表中所有书名中包含“计算机”的书籍情况,可用()语句。A、SELECT*FROM book WHERE book_nameLIKE‘*计算机*’B、SELECT*FROM book WHERE book_nameLIKE‘%计算机%’C、SELECT*FROM book WHERE book_name=‘%计算机*’D、SELECT*FROM book WHERE book_name=‘*计算机%’

现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。A、insert into book(id,title,price)values(1,’java’,100)B、insert into book(title,price)values(’java’,100)C、insert into book values(’java’,100)D、insert book values(’java’,100)

要查询book表中所有书名中以“计算机”开头的书籍的价格,可用()语句。A、SELECT price FROM book WHERE book_name=‘计算机*’B、SELECT price FROM book WHERE book_nameLIKE‘计算机*’C、SELECT price FROM book WHERE book_name=‘计算机%’D、SELECT price FROM book WHERE book_nameLIKE‘计算机%’

有一个商品信息表(表名:ProInfo),表的字段为:ProID(商品编号),ProCatg(商品类别),ProName(商品名称),ProPrice(商品价格),下列选项()可以查询每一类商品的平均价格。A、Select ProCatg,AVG(ProPrice) From ProInfoB、Selecct AVG(ProPrice) From ProInfo Group By ProCatgC、Select AVG(ProPrice) From ProInfo

现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()A、select top 1 * from book order by price ascB、select top 1 * from book order by price descC、select top 1 * from book where price= (select max (price)from book)D、select top 1 * from book where price= max(price)

在SQLServer数据库(排序规则为默认值)中,有一个产品表products,你想按照价格从小到大的顺序显示所有产品的名称(productname)和价格(price),可以实现该功能的T-SQL语句是()A、SELECT productname,price from products order by price ASCB、SELECT productname,price from products order by price DESCC、SELECT productname,price from products order by priceD、SELECT productname and price from products order by price DESC

下面SQL语句都使用了聚合函数,其中选项()存在错误。A、SELECT MIN(au_lname) FROM authorsB、SELECT ADD(ytd_sales+1) FROM titlesC、SELECT type,MAX(price) FROM titles GROUP BY type ORDER BY typeD、SELECT COUNT(*) ,avg(price) FROM titles WHERE advance $1000

指出下面sql语句错误之处() select id_number “Part Number”, sum(price) “price” from inventory where price 50 group by “Part Number” order by 2;A、order by 2B、from inventoryC、where price>50D、group by “Part Number”

如果要查询book表中所有书名以“数据库”开头的书籍价格,下列()语句是正确的。A、SELECT price FROM book WHERE book_name=“数据库*”B、SELECT price FROM book WHERE book_name LIKE“数据库*”C、SELECT price FROM book WHERE book_name=“数据库%”D、SELECT price FROM book WHERE book_name LIKE“数据库%”

You want to display the titles of books that meet these criteria: 1. Purchased before January 21, 2001 2. Price is less then $500 or greater than $900 You want to sort the results by their data of purchase, starting with the most recently bought book. Which statement should you use? ()A、SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date '21-JAN-2001' ORDER BY purchase_date;B、SELECT book_title FROM books WHERE price IN (500,900) AND purchase_date '21-JAN-2001' ORDER BY purchase date ASC;C、SELECT book_title FROM books WHERE price 500 or 900 AND purchase_date '21-JAN-2001' ORDER BY purchase date DESC;D、SELECT book_title FROM books WHERE (price 500 OR price 900) AND purchase_date '21-JAN-2001' ORDER BY purchase date DESC;

单选题现有书目表book,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。Aselect avg(price),type from book group by typeBselect count(price),type from book group by priceCselect avg(price),type from book group by priceDselect count(price),type from book group by type

多选题现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()Aselect top 1 * from book order by price ascBselect top 1 * from book order by price descCselect top 1 * from book where price= (select max (price)from book)Dselect top 1 * from book where price= max(price)

单选题现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()。Aselect top1*from book order by price ascBselect top1*from book order by price descCselect top1*from book where priceDselect top1*from book where price=max(price)

单选题下面SQL语句都使用了聚合函数,其中选项()存在错误。ASELECT MIN(au_lname) FROM authorsBSELECT ADD(ytd_sales+1) FROM titlesCSELECT type,MAX(price) FROM titles GROUP BY type ORDER BY typeDSELECT COUNT(*) ,avg(price) FROM titles WHERE advance $1000

单选题要查询book表中所有书名中以“计算机”开头的书籍的价格,可用()语句。ASELECT price FROM book WHERE book_name=‘计算机*’BSELECT price FROM book WHERE book_nameLIKE‘计算机*’CSELECT price FROM book WHERE book_name=‘计算机%’DSELECT price FROM book WHERE book_nameLIKE‘计算机%’

单选题如果要查询book表中所有书名以“数据库”开头的书籍价格,下列()语句是正确的。ASELECT price FROM book WHERE book_name=“数据库*”BSELECT price FROM book WHERE book_name LIKE“数据库*”CSELECT price FROM book WHERE book_name=“数据库%”DSELECT price FROM book WHERE book_name LIKE“数据库%”