單項(xiàng)選擇題假設(shè)訂單表orders用來(lái)存儲(chǔ)訂單信息,cid代表客戶編號(hào),money代表單次訂購(gòu)額,現(xiàn)要查詢每個(gè)客戶的訂購(gòu)次數(shù)和每個(gè)客戶的訂購(gòu)總金額,下面()sql語(yǔ)句可以返回正確結(jié)果。

A.select cid,count(distinct(cid)),sum(money) from orders group by cid
B.select cid,count(distinct(cid)),sum(money) from orders order by cid
C.select cid,count(cid),sum(money) from orders order by cid
D.select cid,count(cid),sum(money) from orders group by cid


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題定義列中可以接受的數(shù)據(jù)值或格式,稱為()。

A.唯一性約束
B.檢查約束
C.主鍵約束
D.默認(rèn)約束

2.單項(xiàng)選擇題關(guān)于sql server常用的數(shù)據(jù)類型,以下()說(shuō)法是錯(cuò)誤的。

A.Image數(shù)據(jù)類型可以用來(lái)存儲(chǔ)圖像。
B.使用字符數(shù)據(jù)類型時(shí),可以改變長(zhǎng)度信息。
C.使用數(shù)字?jǐn)?shù)據(jù)類型時(shí),可以改變長(zhǎng)度信息。
D.Bit數(shù)據(jù)類型為1位長(zhǎng)度,可以存儲(chǔ)表示是/否的數(shù)據(jù)。