If you're new to sql and database admin, I'm not sure you should go that route at the moment.
I think your efforts would be better spent getting accustomed and confident with Tersus.
For grand totals, consider creating and adding an extra row following the rows created per record which will contain the totals.
For specific advice, you're welcome to attach your work thus far (or relevant screenshots).
For best results, use the Firefox browser..