SQL - group by column count into a single row

0 votes

I'm trying take the result from a group by <col> into a single row, as my graphing library requires a single row for visualizing a stacked bar. For context, I'm using Presto/AWS Athena.

My query is SELECT result, count(*) FROM table GROUP BY result

Essentially

result  | count
skipped | 12
passed  | 13
failed  | 2

Into

skipped | passed | failed
12      | 13     | 2

Jan 18, 2023 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 7 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP