QUERY PLAN
Sort (cost=79.23..79.23 rows=1 width=245)
Sort Key: serial_no DESC
-> Seq Scan on tbl_erp_payment_tickets (cost=0.00..79.22 rows=1 width=245)
Filter: ((created_at >= '2025-08-04 00:00:00+08'::timestamp with time zone) AND (created_at <= '2025-08-04 23:59:59+08'::timestamp with time zone) AND ((serial_no)::text ~~* '%FK-20250804-%'::text) AND (length((serial_no)::text) = 17))