query_name
column to group the results by each query.quality
by averaging the ratio of rating
to position
for each query.poor_query_percentage
by summing the instances where rating
is less than 3, dividing by the total count of queries for each query_name
, and multiplying by 100 to get the percentage.ROUND()
function to format both quality
and poor_query_percentage
to two decimal places.query_name
using the GROUP BY
clause.erDiagram Queries { varchar query_name varchar result int position int rating }