Q:

Group by multiple fields C# with object List

I have the following data structure:
List<List<RecordItem>> combinedList = new List<List<RecordItem>>()
{
    new List<RecordItem>()
    {
        new RecordItem() { fieldName = "StudentId", value = "S1" },
        new RecordItem() { fieldName = "Maths", value = "90" },
        new RecordItem() { fieldName = "Term", value = "1" },
    },
    new List<RecordItem>()
    {
        new RecordItem() { fieldName = "StudentId", value = "S1" },
        new RecordItem() { fieldName = "Science", value = "70" },
        new RecordItem() { fieldName = "Term", value = "1" },
    }
}; 

I need to group it using StudentId and Term, I was able to group by one field -> studentId (Credits: Enigmativity) but unbale to group by multiple fields (studentId and term). 
The first issue is how to use LINQ to take another field (term)? and secondly, how to complete this code for the grouping. 
List<List<RecordItem>> groupedList =
(
    from records in combinedList
    from student in records.Take(1) 
    from term   in records.Take(?) // how do I get the term which is the 4th element???
    let StudentId = student.value
    let Term = term.value
    let Subjects = records.Skip(1)
    group Subjects by new
    {
       StudentId,Term   
    into gss
    select new []
    {
        new RecordItem() { fieldName = "StudentId", value = gss.Key.StudentId },
        new RecordItem() { fieldName = "Term", value = gss.Key.Term },
    }.Concat(gss.SelectMany(x => x)).ToList()
).ToList();

A:

I can't really understand what is going on here and what you are selecting, but this is syntactically correct code:
static void Main(string[] args)
        {
            List<List<RecordItem>> combinedList = new List<List<RecordItem>>()
            {
                new List<RecordItem>()
                {
                    new RecordItem() { fieldName = "StudentId", value = "S1" },
                    new RecordItem() { fieldName = "Maths", value = "90" },
                    new RecordItem() { fieldName = "Term", value = "1" },
                },
                new List<RecordItem>()
                {
                    new RecordItem() { fieldName = "StudentId", value = "S1" },
                    new RecordItem() { fieldName = "Science", value = "70" },
                    new RecordItem() { fieldName = "Term", value = "1" },
                }
            };

            List<List<RecordItem>> groupedList =
            (
                from records in combinedList
                from student in records.Take(1)
                let StudentId = student.value
                let Term = records.ToArray().ElementAt(3).value
                let Subjects = records.Skip(1)
                group Subjects by new
                {
                    StudentId,
                    Term
                }
                    into gss
                    select new[]
                {
                    new RecordItem() { fieldName = "StudentId", value = gss.Key.StudentId },
                    new RecordItem() { fieldName = "Term", value = gss.Key.Term },
                }.Concat(gss.SelectMany(x => x)).ToList()
            ).ToList();
        }

