QUERY PLAN
Sort (cost=13.83..13.84 rows=1 width=427)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_other_payment_tickets (cost=0.00..13.82 rows=1 width=427)
Filter: ((created_at >= '2025-08-15 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-08-15 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%QTYFD-20250815-%'::text) AND (length((serial_no)::text) = 20))