คำสั่ง ครับ
select x.*,concat(p.pname,p.fname,' ',p.lname) as ptname ,r.xn as real_xn,i.xray_items_name,
v.age_y
from xray_report x
left outer join xray_items i on i.xray_items_code=x.xray_items_code
left outer join vn_stat v on v.vn=x.vn
left outer join patient p on p.hn=x.hn
left outer join xrayxn r on r.hn=x.hn and r.regdate between '2005-01-01' and '2005-12-31'
where x.xn=9