Another arithmetic function in SQL is the AVERAGE function used to solve for the average of a specified column in your table.
I have two (2) tables here, the STUDENT and GRADE table. We will join the two tables using a natural join (it will display records with match only on the other table).
For example, if we want to display the average grade of the student Rize Adora, then we will use the following query:
Query
SELECT stud_name,AVG(grade) from grade natural join student where stud_id='1'
Output
0 comments:
Post a Comment