I'm doing an sql query to get averages of accesses for which I first make a query to extract all the accesses of a table and divide them for another field of a different table.
The first table is called TrackEvent and from it I extract a column which the
I have divided for a number to get an average with the following query:
select count(event)/74 from ABC.TrackEvent where course_display_name = "course-v1-AGROSYS-Ed2-2017-FEB" and session !="";
The other table that I have is called students and has only two columns, the first is the name of the course and the next the number of students. that is to say: Table students
course: course-v1-AGROSYS-Ed2-2017-FEB
student_numbers: 74
How can I do to replace the number 74 of the query before shown by the value of the column number students of the table students.
thanks