Changed all Queries from mySQL to PostgreSQL Statements

First Version after changed Statements and tests. Removed many
console.log Lines.