docs improved; days sub sql adjusted to more db engines