Query in SQL, Pyspark

Job ID: 35776471

Budget: $10 – $30 USD

Suppose I have a table with 10,000 customer transactions, I need to do the sum in a time window (as described in the attachment).
-----------------------------------------------------------------------

Suponha-se que tem uma tabela com 10.000 transações de clientes, preciso que faça a somatoria em janela de tempo(como descrito no anexo).