Skip to content

1211. Queries Quality and Percentage

1
2
3
4
5
6
SELECT
  query_name,
  ROUND(AVG(rating / position), 2) AS quality,
  ROUND(AVG(rating < 3) * 100, 2) AS poor_query_percentage
FROM Queries
GROUP BY 1;