Will have to check, don't have one single code for this but have played around billing schedules to know this.
But the basic steps for your requirement will be:
In getInput stage, to fetch the list of billing schedule internal IDs meeting your criteria.
In the map stage, load the billing schedule record, iterate through the sublist and pass it over to the summary stage.
In summary the stage iterates over the Conext,
Create the CSV and send the email.
Do note: it will be slightly time consuming for even MapReduce to process and send it over. Specifically if there are too many billing schedules.