GregVernon
10-07-2008, 11:22 PM
Hi.
I need to write an SQL statement which orders ONE table by an average 'star' rating in a separate table. Where would I even start with this?
I need all the data from the first table 'companies'. The primary key is "id".
The table, 'review' has a structure like this:
r_id, primary key, auto-increment
parent_id, used to identify reviews to companies
stars, what I need to average and order by
I need to write an SQL statement which orders ONE table by an average 'star' rating in a separate table. Where would I even start with this?
I need all the data from the first table 'companies'. The primary key is "id".
The table, 'review' has a structure like this:
r_id, primary key, auto-increment
parent_id, used to identify reviews to companies
stars, what I need to average and order by
