Write the following query with and without the GROUP BY clause: List all students with their corresponding average grade.

Consider the following ODL de?nitions:


class Person : Object
( extent PersonExt ):PERSISTENT;
{
attribute String Name;
... ... ...
}
class Student extends Person
( extent StudentExt ):PERSISTENT;
{
attribute Integer Id;
attribute Set Transcript;
... ... ...
}
struct TranscriptRecord {
String CrsCode;
float Grade;
String Semester;
}



SELECT S.Name, avg(flatten(S.Transcript).Grade)
FROM StudentExt S
SELECT S.Name, avg(T.Grade)
FROM StudentExt S, S.Transcript T
GROUP BY S


The second query just complicates things — all for the sake of being able to use GROUP BY.

Computer Science & Information Technology

You might also like to view...

Which of the following is NOT true about Java?

A. Java is an object-based language. B. Java creates programs that are portable. C. The Java compiler translates into machine language. D. Java supports threads.

Computer Science & Information Technology

You should take great care in managing your internal links to make sure they work correctly and are timely and relevant to the page content.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology