Ad
  • Custom User Avatar

    The same problem.

    PG::SyntaxError: ERROR: return and sql tuple descriptions are incompatible

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Incorrect description:

    Some use the format "First-name Last-name" to identify a person, others use the format "Last-name, First-name".

    SELECT *
      FROM prospects
     WHERE LENGTH(full_name) - LENGTH(REGEXP_REPLACE(full_name, ' ', '', 'g')) > 1
    

    id full_name credit_limit
    1 MS. BRYANA OKUNEVA 8772.04
    2 MRS. ERLING LAKIN 7113.91
    6 SHAINA KONOPELSKI DVM 6729.87
    12 MISS SIERRA WINTHEISER 5622.56
    16 STEPHANIE KUNZE SR. 8574.93
    ...

    MS., MRS., etc. is Title and not part of Last-name or First-name.