php - Selecting average value from multiple rows -


i have 2 columns in mysql database i.e. totalrating , ratingdate. there exists multiple values of totalrating against on date e.g. there can 5 totalratings on date 2016-08-29, 4 on 2016-08-30. using chartjs show graph of totalrating , ratingdate. want take average of totalratings of single date , plot on graph i.e. 1 totalrating 1 date. using php backend. can me queries?

using below query can find average rating dates.

select avg(totalratings) avgrating, date your_table group date; 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -