select s.vn,o.an,s.hn,concat(pt.pname,pt.fname," ",pt.lname) ptname
,s.vstdate,s.bmi,s.bw,s.height
from (
select max(vn) vn
from opdscreen
where vstdate between "2014-10-01" and "2015-03-31"
and bmi between 25 and 29.9
group by hn) a
join opdscreen s on s.vn=a.vn
join patient pt on pt.hn=s.hn