【正文】
以上的記錄,完整的查詢語句如下:select * from(select count(ID) as count from table group by ID)T where 3說出以下聚合數(shù)的含義:avg ,sum ,max ,min , count ,count(*)AVG:求平均值SUM:求和MAX:求最大值MIN:求最小值COUNT(*):返回所有行數(shù)*****************************************************************事務(wù) Transaction 觸發(fā)器 TRIGGER 繼續(xù) continue 唯一 unqiue主鍵 primary key 標(biāo)識列 identity 外鍵 foreign key 檢查 check約束 constraint*****************************************************************說明:隨機(jī)取出10條數(shù)據(jù)select top 10 * from tablename order by newid()1查詢平均成績大于60分的同學(xué)的學(xué)號和平均成績;selectstuId,avg(score)fromScoresgroupbystuIdhavingavg(score)60。