I am using this query to find the 2nd largest element. I am making query on value column.
value
Booking.where("value < ?", Booking.maximum(:value)).last
Is there any better query than this? Or any alternative to this
Aucun commentaire:
Enregistrer un commentaire