I have a some data regarding the customer service calls and now I want to create a sankey chart with the data in power bi. I need a query to display the customer service flow with a count in sql query.
I need a idea to implement the concept like this
| column1 | column2 | count |
| ------------ | ------------ | ------------ |
| language | mainmenu | 170 |
| mainmenu | exit | 15 |
| mainmenu | customer service | 155 |
| customer service | connected | 140 |
| customer service | exit | 15 |
this is was my sample data i have this in pivot format i want to know how to build this logic in SQL
1条答案
按热度按时间wh6knrhe1#
It could be better if you provided an example of your pivoted data. If it looks like my example in #temp table, you can use unpivoting function.
[