Update SQL Statement.
Add management command to flush caches.