Hi Bharath
Below is the solution for your question. Just keep path('') and include root('Table')
select distinct
ISNULL(job.joblead,'')
ROW_NUMBER() OVER(ORDER BY Desc) as Item_Number ,Count(*) Quantity,Desc Desc
FROM dbo.tableJob job
left join jobprods on thejob=tableJob
left join ItemSkill on tblleadsprodsold_sp.theItem = ItemSkill.theItem
left join SkillGroup on ItemSkill.theSkillGroup = SkillGroup.theKey
where thejob = 6670683 and tableJob=6670683
group by SkillGroup.theKey, SkillGroup.Desc,tableJob
for xml path(''), root('Test')
Regards
Willington