私は2つの異なるテーブルを持っています
table1 - property
=================
id,name, address, city state, zip
table2 - floorvalue
===================
id, rentmin, rentmax, bedrooms, bathrooms
2 つのテーブルから最小家賃の値を取得するクエリが必要です。たとえば、プロパティ ID、名前、都市、州、フロア ID、rmin、rmax などのすべての値を持つ 2 つのレコードを取得する現在の以下のクエリが必要ですが、同じIDのレコードを2つ以上取得した場合の最初の最低家賃。
私が持っているクエリ:
select
p.id,
p.name,
p.address,
p.city,
p.state,
p.zip,
f.id,
f.rmin,
f.rmax,
f.bedrooms,
f.bathrooms
from property as p, floorvalue as f
where p.city = 'losangeles' and p.state = 'ca' and p.id = f.id