In my Ruby on Rails application I have a database structure like this:
Project.create(:group => \"1\", :date => \"2014-01-01\") Project.create(:group =
Project.where(:group => "1", :date => "2014-01-01").last
.last is what you are looking for.