SELECT concat(pt.pname,pt.fname,' ',pt.lname,o.hn,o.vn,SUM(sum_price) AS tot_price
FROM ((ovst o LEFT OUTER JOIN opitemrece op ON o.vn=op.vn)
LEFT OUTER JOIN patient pt ON o.hn=pt.hn)
WHERE vstdate >='2011/01/01'
AND vstdate <'2011/01/01'
GROUP BY hn,vn,vsdate