根据我的内部联接,列是未知的
错误代码:1054。“字段”中的未知列“ storage_rates.s_rate” 列表”
select
entry_id,
contr_list.contr_no,
contr_type.type_code,
storage_rates.s_rate
from entry_list
left join contr_list
on contr_list.contr_id = entry_list.contr_id
left join contr_type
on contr_type.type_id = contr_list.contr_type_id
inner join (SELECT contr_type_id FROM storage_rates WHERE rate_stat = 1) s
on s.contr_type_id = contr_type.type_id;
基于内部联接的storage_rates.rate_stat = 1,预期输出为storage_rates.s_rate =