这个查询有什么问题:
SELECT *
FROM families f JOIN family_histories fh ON f.id = fh.family_id
WHERE f.family_status_cat_id = 1422
AND (SELECT hst.created_at
FROM family_histories hst
WHERE hst.family_history_cat_id = 1422
AND hst.new_value LIKE '%1422%')
BETWEEN '2010/2/13' AND '2013/3/6'
我得到 -
'where 子句'中的未知列'hst.new_value'
. 但是专栏存在!!!