long count = 0;
long totalLatency = 0;
String nextToken = null;
// retrieve all the items which are in the
// date range we want
SelectRequest request = new SelectRequest(
"select SentTimestamp, PickedUpTimestamp, MessageBody "
+ "from sqs_log " + "where SentTimestamp > '"
+ format.format(start) + "' "
+ "and PickedUpTimestamp < '" + format.format(end)
+ "'");
do {
request.setNextToken(nextToken);
SelectResult result = simpleDB.select(request);
nextToken = result.getNextToken();
for (Item item : result.getItems()) {