History query Order and limit added