SELECT group_no,group_name, dept_no, dept_name, brand, from_nnm,to_nnm
FROM xx_nnm_benchmark
I have one record from the above query for group_no 1100 and dept_no 50 I have one more deps table in which i have 8 more deptno from group_no 1100 I need to get 8more records with same group_no,name
basically you need to join both these table on unique id. we can assume your 'group_no and group_name' together as unique and do inner join. left or right join might also work but i would go for inner for this task