Ad
  • Custom User Avatar

    Yes, you are right. But the kata description is not wrong, when it was designed the generated data worked that way. Someone changed the functions that generates the names to add those titles. Still, this makes this kata even closer to the real world problems we face on a day to day base. The solution should be more complex than I've originally envisioned though.

  • Custom User Avatar

    Make sure to do a SELECT from the VIEW itself.

  • Custom User Avatar

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

  • Custom User Avatar

    I make the Select query is already okay, but when add CREATE VIEW, no row is return, do you have any idea ?

  • 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.