I was finishing ordering timestamps and dates, and I can't quite get it to work:
=QUERY(Sheet3!A:I, "
SELECT D, SUM(I)
GROUP BY WEEKNUM(D) ORDER BY D DESC
LABEL SUM(I) 'Balance Semanal'
SUM(I) '$#,##0.00'")
Please let me know your thoughts on how to fix this.