solved exercises 1-7 regarding array usage in postgres sql