Compare commits

..

No commits in common. "d85132eb466ef6a9516a1992aac125a5848369b2" and "228ff2efe2d1580464d1e05f02500b3921d0f9f7" have entirely different histories.

2 changed files with 1 additions and 11 deletions

View file

@ -1,5 +1,5 @@
DB_NAME := lab.db
SQL_FILES := init.sql lab1.sql a.sql b.sql c.sql d.sql e.sql f.sql g.sql h.sql i.sql j.sql k.sql l.sql m.sql n.sql o.sql
SQL_FILES := init.sql lab1.sql a.sql b.sql c.sql d.sql e.sql f.sql g.sql h.sql i.sql j.sql k.sql l.sql m.sql n.sql
.PHONY: all clean

10
o.sql
View file

@ -1,10 +0,0 @@
DROP VIEW IF EXISTS StudentsCredits;
CREATE VIEW StudentsCredits AS
SELECT Students.pNbr, sum(credits) as totalCredits
FROM Students
JOIN TakenCourses ON Students.pNbr = TakenCourses.pNbr
JOIN Courses ON TakenCourses.courseCode = Courses.courseCode
GROUP BY Students.pNbr;
SELECT * FROM StudentsCredits ORDER BY totalCredits DESC;