你们能帮我解决这个问题吗?
错误说''on Clause'中的未知列'd.idspesialis''
SELECT a.*, b.*, c.*, e.*,d.*, f.*,g.*
FROM ckehamilan a
INNER JOIN pasien b
ON a.noRM=b.noRM
INNER JOIN ( select idPegawai , NamaPegawai as NamaDokter from tpegawai ) d
ON a.idPegawai=d.idPegawai
LEFT JOIN spesialis e
ON e.idspesialis=d.idspesialis
INNER JOIN ( select idPegawai , NamaPegawai as NamaParamedis from tpegawai ) f
ON a.idparamedis=f.idPegawai
LEFT JOIN imunisasi g
ON a.idimunisasi=g.idimunisasi
INNER JOIN ruang c
ON a.idruang=c.idruang