Plus fixing bugs: - fixed tests - fixed schema definition to reflect response data - split WHERE SQL clause into time constraints and rest