"SQLSTATE[42703]: Undefined column: 7 ERROR: column \"productBarcodes.code\" does not exist\nLINE 1: ...*
from (select \"products\".*, max((case when LOWER(\"productBa...\n ^ (SQL: select * from (select \"products\".*,
max((case when LOWER(\"productBarcodes.code\") ILIKE \u043d then 150 else 0 end) + (case when
LOWER(\"productBarcodes.code\") ILIKE \u043d% then 50 else 0 end) + (case when LOWER(\"productBarcodes.code\") ILIKE
%\u043d% then 10 else 0 end)) as relevance from \"products\" where \"products\".\"deletedAt\" is null group by
\"products\".\"id\" having (case when LOWER(\"productBarcodes.code\") ILIKE \u043d then 150 else 0 end) + (case when
LOWER(\"productBarcodes.code\") ILIKE \u043d% then 50 else 0 end) + (case when LOWER(\"productBarcodes.code\") ILIKE
%\u043d% then 10 else 0 end) >= 10.00 order by \"relevance\" desc) as products)"
MariaDB [yii2advanced]> select min(id) from scan order by id desc limit 1000000;
+---------+
| min(id) |
+---------+
| 25694 |
+---------+
1 row in set (7.372 sec)