Fixed stats endpoint response to have query params and in date histogram format