Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は、(とりわけ) 0 から 4 までの評価と送信日を持つテーブルを持っています。
2 つの日付の間のすべての日付について、ある日付で得られる平均評価を選択できることを知りたいです。
はい、明らかな SQL 演算子をすべて使用します。
select date, avg(rating) avg_rating from table where date between :start and :end group by date
確かに、これはかなり基本的な SQL です。
SELECT AVG(rating) AS rating, rating_date FROM ratings GROUP BY rating_date;