This query displays all the products that have average rating above or equal to 3.5 ordered by average rating.

\begin{lstlisting}
SELECT p.productID, p.name, AVG(pr.rating) AS avg_rating
FROM product_review pr, product p
WHERE p.productID = pr.productID
GROUP BY p.productID
HAVING avg_rating >= 3.5
ORDER BY avg_rating DESC;
\end{lstlisting}