select * from(SELECT l.Prepared_Date as Prepared_Date
, m.Material_Code as Material_Code
,n.Name as Name,n.Description as Description
, m.Quantity as Quantity,n.Unit_Of_Measure as Unit_Of_Measure
, m.Status as Status ,l.Requested_By as requester
FROM mms_store_requisition l inner join
mms_store_requisition_detail m on l.SR_No=m.SR_No
inner join mms_material n on m.material_code=n.material_code
where l.Prepared_Date between '1966-01-01' and '2003-12-12'
order by m.Status, m.Material_Code) request
inner join (select t1.emp_Id as employee,t1.department_id
,t2.description as Requestion_Department
from hr_employee_info t1 inner join tbl_department t2
on t1.department_id=t2.department_id) empInfo
on request.requester=empInfo.employee