fixed sql-syntax bug (true/false)
fixed group-counting bug on Date-fields