Guru on Rails

if you don’t sacrifice for your dream then your dream becomes your sacrifice.
Will Nguyen


Sun 24 Feb 2019


1. Searching the products which have duplicated names."name, count(*) as num").group(:name).having("num > 1") SELECT name, COUNT(*) FROM products GROUP BY name HAVING COUNT(*) &g...

Thu 18 Jul 2019

Performance SQL Best Practices

If we work on a complex system, queries are pretty complex with a ton of subqueries, we would encounter the problem of optimization of query. In order to achieve a goal, we have many ways to do. So...