select sd.name "Service Name", rtl.templatename "Service Template Name", rtl.comments "Template description", rtf.description "Description field" , ttd.templatename "Task Name",ttd.title "Task Title",std .statusname "Task Status"
from requesttemplate_list rtl
LEFT JOIN requesttemplate_fields rtf ON rtl.templateid=rtf.templateid
LEFT JOIN Categorydefinition cd ON rtf.categoryid=cd.categoryid LEFT JOIN subcategorydefinition scd ON rtf.subcategoryid=scd.subcategoryid
LEFT JOIN itemdefinition id ON rtf.itemid=id.itemid
LEFT JOIN Servicedefinition sd ON rtl.parent_Service=sd.serviceid
left join requesttasktemplate rtt on rtl.templateid=rtt.reqtemplateid
left join tasktemplatedetails ttd on ttd.templateid=rtt.templateid
left join statusdefinition std on std.statusid=ttd.statusid
where is_catalog_template='true' AND rtl.isdeleted='false' ORDER BY 2