摘要:
(一)1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select*frompeoplewherepeopleIdin(selectpeopleIdfrompeoplegroupbypeopleIdhavingcount(peopleId)>1)2、删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录deletefrompeoplewherepeopleIdin(selectpeopleIdfrompeoplegroupbypeopleIdhavingcount(peopleId)>1)androwidno 阅读全文
摘要:
---所有书籍价格的统计select sum(price)总价,avg(price)均价,max(price)最高价,min(price)最低价from titles---统计where条件的记录---business类型书籍价格的统计select sum(price)总价,avg(price)均价,max(price)最高价,min(price)最低价from titles where type='business'--count返回记录的条数--返回作者共来自几个州select count (distinct state)州数 from authorsselect coun 阅读全文