Postgres View Function Python Questions Geeksforgeeks Problem