I am using mysql database. I have a table called feedback, which has a howIsTraining field which can have one value out of five values: “Excellent, very good, good, bad and sorry”
I want to write a query that will give the average value of this value from all the data in the following format
I want to give an integer value for each of the values
Excellent = 5 Very Good = 4 Good = 3 Poor = 2 Pathetic = 1
if I say that I have five entries in the table Excellent, very good, excellent, good, bad it means ((5 + 4 + 5 + 3 + 2) / 5) = 3.8
finally he will give the result as 3.8
source share