Hvis jeg antager, at jeg forstår din anmodning korrekt, tror jeg, at det, du har brug for, er noget i denne retning:
SELECT "periods"."start_date",
"periods"."end_date",
SUM(CASE WHEN "balance_transactions"."created" BETWEEN "periods"."start_date" AND "periods"."end_date" THEN "balance_transactions"."fee" ELSE 0.00 END) AS period_sum
FROM "balance_transactions"
JOIN charges ON balance_transactions.source = charges.balance_id
JOIN ( SELECT '2013-12-20'::date as start_date, '2014-01-19'::date as end_date UNION ALL
SELECT '2013-12-21'::date as start_date, '2014-01-20'::date as end_date UNION ALL
SELECT '2013-12-22'::date as start_date, '2014-01-21'::date as end_date UNION ALL
SELECT '2013-12-23'::date as start_date, '2014-01-22'::date as end_date UNION ALL
SELECT '2013-12-24'::date as start_date, '2014-01-23'::date as end_date
) as periods
ON "balance_transactions"."created" BETWEEN "periods"."start_date" AND "periods"."end_date"
WHERE "balance_transactions"."account_id" = 6
AND "balance_transactions"."type" = 'charge'
AND "charges"."refunded" = false
AND "charges"."invoice" IS NOT NULL
GROUP BY "periods"."start_date", "periods"."end_date"
Dette skulle returnere alle de perioder, du er interesseret i, i et enkelt resultatsæt. Da forespørgslen er 'genereret' med det samme i din frontend, kan du tilføje så mange rækker til punktum-delen, som du vil.
Edit:med nogle forsøg og fejl lykkedes det mig at få det til at fungere [i sqlFiddle][1] og opdaterede syntaksen ovenfor i overensstemmelse hermed.