Python Program Execution Flow Of A Sql