"Hope it is complete info."Yes.declare @adm_centre table( ccode int, cname varchar(100))declare @eval_res_master table( eval_m_sno int, eval_date datetime, ccode int, code varchar(100))insert into @adm_centreselect 1, 'Centre A' union allselect 2, 'Centre B' union allselect 3, 'Centre C'set dateformat dmyinsert into @eval_res_masterselect 1, '22/08/2006', 1, 'STD1' union allselect 2, '22/08/2006', 1, 'STD1' union allselect 3, '22/08/2006', 1, 'STD1' union allselect 4, '22/08/2006', 1, 'STD2' union allselect 5, '22/08/2006', 1, 'STD2' union allselect 6, '22/08/2006', 1, 'STD3' union allselect 7, '22/08/2006', 2, 'STD4' union allselect 8, '22/08/2006', 2, 'STD5' union allselect 9, '22/08/2006', 3, 'STD6' union allselect 10, '22/08/2006', 3, 'STD6' union allselect 11, '22/08/2006', 3, 'STD7' union allselect 12, '22/08/2006', 3, 'STD8' union allselect 13, '22/08/2006', 3, 'STD9'select c.ccode, count(distinct code) as Total_Studentfrom @adm_centre c inner join @eval_res_master e on c.ccode = e.ccodegroup by c.ccode/*ccode Total_Student ----------- ------------- 1 32 23 4(3 row(s) affected)*/
KH