Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SELECT quality ,ratio * 100 AS percent,total FROM (
SELECT quality , count(*) AS total, RATIO_TO_REPORT(total) OVER() AS ratio
FROM [telegrass_reviews.reviews]
GROUP by quality
)
SELECT price ,ratio * 100 AS percent,total FROM (
SELECT price , count(*) AS total, RATIO_TO_REPORT(total) OVER() AS ratio
FROM [telegrass_reviews.reviews]
GROUP by price
)
SELECT quality ,ratio * 100 AS percent,total FROM (
SELECT quality , count(*) AS total, RATIO_TO_REPORT(total) OVER() AS ratio
FROM [telegrass_reviews.reviews]
GROUP by quality
)
SELECT communication ,ratio * 100 AS percent,total FROM (
SELECT communication , count(*) AS total, RATIO_TO_REPORT(total) OVER() AS ratio
FROM [telegrass_reviews.reviews]
GROUP by communication
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment