问一条比较难的sql查询语句

如果下面有两个表,
一个是酒店表
id
HotelName 酒店名
HotelCity 酒店所在城市
......一些酒店基本信息

一个是酒店房间价格表

id
HouseName 房间名
HousePrice 价格
HotelName 酒店名称

怎么样查询某个城市的所有酒店基本信息和每个酒店房间价格最低价和最高价以及这个城市酒店里面的最低价,
谢谢
大家注意是一条sql语句呀

某个城市的所有酒店基本信息:select * from 酒店表 where HotelCity='城市名'

每个酒店房间价格最低价和最高价: select min(HousePrice) 最低价,max(HousePrice) 最高价 from 价格表 where HotelCity='城市名' group by HotelName

这个城市酒店里面的最低价select min(HousePrice) 最低价 from 价格表 where HotelCity='城市名' and HotelName='酒店名'
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-08-20
select *
from 酒店表,酒店房间价格表
where 酒店房间价格表.id in
(select 酒店表.id
from 酒店表
where HotelCity='城市名')

select min(HousePrice) ,max(HousePrice)
from 酒店房间价格表
where HotelName ='酒店名'

select min(HousePrice)
from 价格表
where id in
(select 酒店表.id
from 酒店表
where HotelCity='城市名')
第2个回答  2008-08-20
select * from hotel where city='大连'
select max(a),min(b) from (select max(price)as a,min(price) as b where hotelname in (select hetelname from hotel where city='大连'))