Warning in Execution Plan
What is the reason for this warning in Sort operator?


You can see the warning description in properties of the element. I'm sure you will see information like below:


  Operator used tempdb to spill data during execution.....


It means that memory which was granted for the query turned out to be less than it needed. Two possible reasons for that:


Wrong cardinality estimation so the query asked for the less memory grant than it really needed
Lack of memory so the query asked enough memory but got less


Detailed information about memory grant can be found in the properties window of SELECToperation from your query plan.