79380055

Date: 2025-01-23 06:46:14
Score: 1.5
Natty:
Report link

what if i have dynamic set of columns like this?

SELECT * 
  FROM monthly_sales
    PIVOT(SUM(amount) FOR MONTH IN (select distinct month from monthly_sales))
  ORDER BY EMP_ID_renamed;

the output looks like this:

EMP_ID_RENAMED 'JAN' 'FEB' 'MAR' 'APR'

1 10400 8000 11000 18000

2 39500 90700 12000 5300

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): what if i have
  • Low reputation (1):
Posted by: user3363640