0

I use the PostgreSQL database with Sequel. I have the following data in my table: table.all returns following data:

  [{:id=>1,
  :identifier=>"identifier",
  :first_name=>"First",
  :middle_name=>"M.",
  :last_name=>"Last 2",
  :email=>"some@email.com"},
 {:id=>2,
  :identifier=>"identifier",
  :first_name=>"First 2",
  :middle_name=>"A.",
  :last_name=>"Last2 ",
  :email=>"some@email2.com"}]

Now I want to find ids of record which identifier belongs to more than one first_name - last_name combination. So in this example we have two records with the same identifier but different first and last names. Is there any way to do this in Sequel?

Mateusz Urbański
  • 7,352
  • 15
  • 68
  • 133

0 Answers0