Ruby - How to filter SQLite rows based on column conditions

visit shbcf.ru