Python Numpy Aggregate Functions Postgresql Vs Sqlite