Re: How do I do this query?

From: <bit-naughty_at_hotmail.com>
Date: Tue, 6 Feb 2018 23:28:34 -0800 (PST)
Message-ID: <a2fe5555-5746-431c-b566-d073ec9f1603_at_googlegroups.com>


[Quoted] Sorry, J O Aho, I'll read your post in a bit, but....I omitted 2 things in my first post:

[Quoted] The teachers table has a "subject" field (for the subject they teach), and the website will let people query this field. and...
the teacherreviews table can have multiple ratings (lines in the DB) FOR ONE TEACHER - *first*, all the ratings for a *particular teacher* will have to be averaged to get their "score" or whatever you wanna call it, and then all the teachers *of a particular college* will have each of THOSE scores averaged, to get the "overall teacher rating for a PARTICULAR college". How would I do this? Kind of makes my head spin...... :) (I'm guessing IN will be used...?)

[Quoted] I was starting out with something like this:

[Quoted] SELECT college ... FROM teachers, teacherreviews WHERE subject = <inputsubject> AND teachers.primarykey = teacherreviews.teacherid GROUP BY college ....

[Quoted] The dots mean I don't know what to put in there :( And I also didn't do the averaging of 1 particular teacher from multiple ratings in the teacherreviews table either.... (actually I didn't do either average...)

[Quoted] Where do I go from here? :) Received on Wed Feb 07 2018 - 08:28:34 CET

Original text of this message