select top 5 * from hos_house as temp where
HMID not in(select TOP 5 HMID from hos_house order by HMID)order by HMID
--阶段二
select dname,SNAME,HTID,PRICE,TOPIC,CONTENTS,HTIME,COPY from hos_street
inner join hos_house on hos_house.SID=hos_street.SID
inner join hos_district on hos_district.DID=hos_street.SDID
where UID=(select UID from sys_user where UNAME='张三')
--阶段三
select htname,uname,dname,SNAME from hos_house
inner join sys_user on sys_user.UID=hos_house.UID
inner join hos_type on hos_type.HTID=hos_house.HTID
inner join hos_street on hos_house.SID=hos_street.SID
inner join hos_district on hos_district.DID=hos_street.SDID
where Sdid in(select SDID from hos_street group by SDID having COUNT(SID)>1)