Group by full understanding

I could not able to find the proper syntax of using group can anyone please explain about group
by please find the below code which I use as per my requirement but I need to understand concept of using “group by ,into,let etc” I was trying some learning portal but I could not found solution
my question is is that .Not Linq syntax defer from linq uipath syntax as you see given code people using different syntax for there use
1- dataTable new_dt =
old_dt.AsEnumerable().GroupBy(Function(i) i.Field(Of String)(“columnWithDuplic”)).Select(Function(g) g.First).CopyToDataTable

2-IEnum=(From p In dtSheet1.AsEnumerable() Group p By obj_p= New With {Key.P_Employee=p.Item(“Employee”),Key.P_Department=p.Item(“Department”)} Into MG= Group Select new with { .Employee=obj_p.P_Employee,.Department=obj_p.P_Department,.WorkingHours=MG.Sum(Function( r ) Double.Parse(r.Item(“WorkingHours”).ToString()))}).ToList

3-(From d In TestDt Group d By k=d(“rcp_no”).toString.Trim Into grp=Group Where grp.Count >1 Select grp.toList).SelectMany(Function (x) x).CopyToDatatable.AsEnumerable.GroupBy(Function(x) x(“rcp_no”).ToString.Trim).Select(Function(y) y.First).CopyToDataTable()

4-TestDt.AsEnumerable.GroupBy(Function(x) x(“rcp_no”).ToString.Trim).Select(Function(s) s(0)).CopyToDataTable()

5-Duplicate_item=Array_Item.GroupBy(Function(x) x).Where(Function(y) y.Count() > 1).Select(Function(y) y.Key).ToArray()