SQL utilities for Scorpion