Query 1: Calculate GPA for each student First you need to turn letter grade into numeric grade: A: 4.0; A-: 3.67; B+:3.3

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Query 1: Calculate GPA for each student First you need to turn letter grade into numeric grade: A: 4.0; A-: 3.67; B+:3.3

Post by answerhappygod »

Query 1 Calculate Gpa For Each Student First You Need To Turn Letter Grade Into Numeric Grade A 4 0 A 3 67 B 3 3 1
Query 1 Calculate Gpa For Each Student First You Need To Turn Letter Grade Into Numeric Grade A 4 0 A 3 67 B 3 3 1 (23.54 KiB) Viewed 36 times
Query 1 Calculate Gpa For Each Student First You Need To Turn Letter Grade Into Numeric Grade A 4 0 A 3 67 B 3 3 2
Query 1 Calculate Gpa For Each Student First You Need To Turn Letter Grade Into Numeric Grade A 4 0 A 3 67 B 3 3 2 (37.04 KiB) Viewed 36 times
this is using MySQL Workbench
Query 1: Calculate GPA for each student First you need to turn letter grade into numeric grade: A: 4.0; A-: 3.67; B+:3.33; B: 3; B: 2.67; C+: 2.33; C: 2; C-: 1.67; D+: 1.33; D: 1; D-: 0.67; F: 0 The GPA is calculated with the following formula (Don't include null grade in the calculation): GPA = sum(numerical grade credits)/sum(credits) Here is the correct query result for your reference: name id 00128 Zhang GPA 3.858571 12345 Shankar 3.428571 3.000000 19991 Brandt 23121 Chavez 2.330000 44553 Peltier 2.670000 45678 Levy 2.029091 54321 Williams 3.500000 55739 Sanchez 3.670000 76543 Brown 4.000000 76653 Aoi 2.000000 98765 Bourikas 2.240000 98988 Tanaka 4.000000

Running Example: Schema Diagram for University Database student takes ID ID name course_id sec_id dept_name tot cred semester year grade course section course id sec_id semester course_id department title dept_name advisor s.id i id dept_name year building credits building time_slot budget room_no time_slot_id time_slot_id day start_time end_time classroom building room no capacity teaches ID course id sec_id semester year prereq course_id prereq_id instructor ID name dept name salary
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply