Answers for "last select in rails"

0

last select in rails

Statistic.joins("inner join (select customer_id,max(created_at) as created_at from statistics group by customer_id) as stats2 on statistics.customer_id = stats2.customer_id and statistics.created_at = stats2.created_at").pluck("max(statistics.sold_items)")
Posted by: Guest on June-01-2021

Browse Popular Code Answers by Language