SQL and NumPy/Pandas stuff.