-- The number of partitions
\set N 1024

\timing on
EXPLAIN
SELECT students_:N.name, gpas_:N.gpa AS gpa, sum(scores_:N.score) AS total_score
FROM students_:N, scores_:N, gpas_:N
WHERE students_:N.id = scores_:N.student_id AND students_:N.id = gpas_:N.student_id
GROUP BY students_:N.id, gpas_:N.student_id;
