Domanda di colloquio di Tredence

How to do pivoting in sql ? How to handle cumulative function in sql ?