Changes between Version 2 and Version 3 of AdvancedReports


Ignore:
Timestamp:
07/15/26 10:09:10 (13 days ago)
Author:
216009
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AdvancedReports

    v2 v3  
    5353}}}
    5454
     55== Report 3: Current Semester Completed Subjects and GPA ==
     56
     57=== Data requirements idea/concept title ===
     58'''Students Who Completed All Currently Enrolled Semester Courses with GPA'''
     59
     60=== Data requirements description ===
     61This complex report identifies students who have successfully completed and graded all courses they were enrolled in for the current semester (meaning no active/failed grades left), showing their average grade (GPA) for those subjects. It uses subqueries and group constraints to filter out students with pending grades.
     62
     63=== Solution SQL ===
     64{{{
     65#!sql
     66SELECT s.Student_Index, s.Name || ' ' || s.Surname AS student_name, AVG(ss.Final_Grade) AS semester_gpa, COUNT(ss.Subject_Id) AS completed_courses_count
     67FROM Student s
     68JOIN Student_Subject ss ON s.Id = ss.Student_Id
     69JOIN Subject sub ON ss.Subject_Id = sub.Id
     70WHERE sub.Semester = 'Summer'
     71  AND ss.Status = 'Completed'
     72  AND ss.Final_Grade IS NOT NULL
     73GROUP BY s.Student_Index, s.Name, s.Surname
     74HAVING COUNT(ss.Subject_Id) = (
     75    SELECT COUNT(*)
     76    FROM Student_Subject ss2
     77    WHERE ss2.Student_Id = s.Id
     78)
     79ORDER BY semester_gpa DESC;
     80}}}
     81
     82=== Solution Relational Algebra ===
     83{{{
     84γ_{s.Student_Index, s.Name, s.Surname, AVG(ss.Final_Grade) → semester_gpa, COUNT(ss.Subject_Id) → completed_courses_count}
     85(σ_{sub.Semester='Summer' ∧ ss.Status='Completed'} (Student ⋈_{s.Id=ss.Student_Id} Student_Subject ⋈_{ss.Subject_Id=sub.Id} Subject))
     86}}}
     87
     88== Report 4: Top Performer (Highest GPA) by Enrollment Year ==
     89
     90=== Data requirements idea/concept title ===
     91'''Yearly Academic Champions'''
     92
     93=== Data requirements description ===
     94This advanced analytical report identifies the top student (having the absolute highest GPA) for each enrollment year cohort. It utilizes windowing functions or correlated subqueries to dynamically partition students by year and isolate the single record with the highest average grade.
     95
     96=== Solution SQL ===
     97{{{
     98#!sql
     99WITH StudentGPA AS (
     100    SELECT s.Student_Index, s.Name || ' ' || s.Surname AS student_name,
     101           EXTRACT(YEAR FROM ss.Enrollment_Date) AS enrollment_year,
     102           AVG(ss.Final_Grade) AS cumulative_gpa,
     103           RANK() OVER (PARTITION BY EXTRACT(YEAR FROM ss.Enrollment_Date) ORDER BY AVG(ss.Final_Grade) DESC) as gpa_rank
     104    FROM Student s
     105    JOIN Student_Subject ss ON s.Id = ss.Student_Id
     106    WHERE ss.Final_Grade IS NOT NULL
     107    GROUP BY s.Student_Index, s.Name, s.Surname, EXTRACT(YEAR FROM ss.Enrollment_Date)
     108)
     109SELECT enrollment_year, Student_Index, student_name, cumulative_gpa
     110FROM StudentGPA
     111WHERE gpa_rank = 1
     112ORDER BY enrollment_year DESC;
     113}}}
     114
     115=== Solution Relational Algebra ===
     116{{{
     117τ_{enrollment_year DESC} (
     118  π_{enrollment_year, Student_Index, student_name, cumulative_gpa} (
     119    σ_{gpa_rank = 1} (
     120      γ_{enrollment_year, Student_Index, student_name, AVG(ss.Final_Grade) → cumulative_gpa, RANK() → gpa_rank} (
     121        Student ⋈_{s.Id = ss.Student_Id} Student_Subject
     122      )
     123    )
     124  )
     125)
     126}}}
     127
    55128[[br]]
    56129
     
    67140'''Type of service:''' Free Tier
    68141
    69 '''Final result:''' The AI was utilized to troubleshoot Trac Wiki rendering syntax issues, cross-reference query definitions with strict production schema tables, and format relational algebra groupings safely.
     142'''Final result:''' The AI was utilized to troubleshoot Trac Wiki rendering syntax issues, design highly complex analytical reports (GPA tracking, cohorts), cross-reference query definitions with strict production schema tables, and format relational algebra groupings safely.
    70143
    71144'''Results in details:'''
    72145* '''Debugging Wiki Syntax:''' After identifying formatting block constraint errors within the wiki parser engine, I used the AI to refine character spacing configurations and clean up block parameters.
     146* '''Analytical Report Design:''' The AI assisted in writing complex queries (using Window Functions like RANK OVER PARTITION, EXTRACT, and HAVING clauses) to generate precise semester-by-semester GPA aggregates and student yearly performance matrices.
    73147* '''Schema Verification:''' I used the AI to audit my outer join parameters. It helped verify that I correctly mapped standard casing names (like using Student_Index instead of index_number, and Student_Id instead of stud_id), bringing the reports into perfect synchronization with my DDL code files.
    74 * '''Relational Algebra Formatting:''' The AI assisted in writing out formalized relational algebra sequences using projection, conditional theta-joins, and aggregate extensions ($\gamma$) that accurately express the logic of our underlying SQL queries.
     148* '''Relational Algebra Formatting:''' The AI assisted in writing out formalized relational algebra sequences using projection, conditional theta-joins, and aggregate extensions (γ) that accurately express the logic of our underlying SQL queries.