The problem is occurring here:
|
AND ds.{submission_date} BETWEEN |
As long as a data sources submission_date_column is only set to a field name everything is working fine, but as soon as SQL is used the generated query is invalid due to the alias. ds.{submission_date} cannot be transformed to ds.DATE(submission_timestamp), for example