按类别查询图书的平均价格,以下语句正确的是()。(选择一项)
A: selectavg(price),typefrombookgroupbytype
B: selectcount(price),typefrombookgroupbyprice
C: selectavg(price),typefrombookgroupbyprice
D: selectcount(price),typefrombookgroupbytype
A: selectavg(price),typefrombookgroupbytype
B: selectcount(price),typefrombookgroupbyprice
C: selectavg(price),typefrombookgroupbyprice
D: selectcount(price),typefrombookgroupbytype
举一反三
- BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。显示图书的最高价、最低价、平均价、最高价与最低价之间的差值。SQL语句:SELECTMAX(Price)As最高价,MIN(Price)As最低价,Str(AVG(Price),6,2)As平均价()As最高价与最低价的差值FromBook A: (MAX-MIN)Price B: MAX(Price)-MIN(Price) C: (MAX-MIN)(Price) D: MAX:Price-MIN:Price
- BookStore数据库中有图书表Book(BookCode, BookName, Author, PublisherCode, PublishTime,BookSort, ISBN, BookPicture, ContentInro, Price, Discount),其中 PublishTime是datetime类型。显示图书的最高价、最低价、平均价、最高价与最低价之间的差值。SQL语句:SELECT MAX(Price) As 最高价, MIN(Price) As 最低价, Str(AVG(Price),6,2) As 平均价,________ As 最高价与最低价的差值 From Book A: (MAX-MIN)Price B: MAX(Price)-MIN(Price) C: (MAX-MIN)(Price) D: MAX:Price-MIN:Price
- 显示图书的最高价、最低价、平均价、最高价与最低价之间的差值。语句如下:SELECT Max(Price) AS 最高价, ________ AS 最低价, Str(Avg(Price),6,2) AS 平均价, Max(Price)-Min(Price) AS 最高价与最低价的差值FROM Book
- 为查询Products表中,价格Price在5-10元之间的产品信息,请补全以下SELECT语句 SELECT ProductID,ProductName,Price FROM products WHERE_________ AND_________ A: price>=5,price<=10 B: price>5,price<10 C: price<=5,price<=10 D: price>=5,price>=10
- 有如下SQL语句: SELECT DISTINCT productName, price FROM product WHERE (price>;(SELECT AVG(price) FROM product)) ORDER BY price DESC; 下面说法错误的是( )。 A: "SELECT AVG(price) FROM product "是子查询 B: "ORDER BY price DESC"是指按price从低到高顺序排列 C: 查询结果显示的是大于平均价格的产品记录 D: 此查询显示的字段只有"productName"和"price"