Update SQL commands to only include completed transactions
Updates for June 2014