G
Guest
Do you have any suggestions on how I can write a single query that will move
the STATE row to a column. Giving the resolute like the example below. I
am only able to do it by separating each STATE in to multiple separate
tables. Then rejoining them back with another query.
Source Table
SKU STATE SALES
508671 UTAH $475,560
508671 NEVADA $634,464
508671 IDAHO $456,432
508721 UTAH $404,208
508721 NEVADA $240,480
508721 IDAHO $739,440
508788 UTAH $541,440
508788 NEVADA $316,416
508788 IDAHO $287,088
Query Resolute
SKU UTAH NEVADA IDAHO
508671 $475,560 $634,464 $456,432
508721 $404,208 $240,480 $739,440
508788 $541,440 $316,416 $287,088
Thank You, Kevin
the STATE row to a column. Giving the resolute like the example below. I
am only able to do it by separating each STATE in to multiple separate
tables. Then rejoining them back with another query.
Source Table
SKU STATE SALES
508671 UTAH $475,560
508671 NEVADA $634,464
508671 IDAHO $456,432
508721 UTAH $404,208
508721 NEVADA $240,480
508721 IDAHO $739,440
508788 UTAH $541,440
508788 NEVADA $316,416
508788 IDAHO $287,088
Query Resolute
SKU UTAH NEVADA IDAHO
508671 $475,560 $634,464 $456,432
508721 $404,208 $240,480 $739,440
508788 $541,440 $316,416 $287,088
Thank You, Kevin