How to get max count for particular product and group by custom id from sql database
10:55 11 May 2018

I have following database and needs to get a max count for a particular product with the group by customer id from SQL database.

enter image description here

I tried with SQL subquery, but not able to get solved. Please help me to solve this problem.

I need output as like following if product name is bajari,

enter image description here

sql ruby-on-rails sqlite