# name: test/sql/tpch/tpch_like.test_slow # description: Test LIKE statement on TPC-H # group: [tpch] require tpch statement ok PRAGMA enable_verification statement ok CALL dbgen(sf=0.1) # LIKE query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE '%horse%' ---- 1262 query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE 'horse%' ---- 50 query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE '%horse' ---- 50 # with underscore query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE '%h_rse%' ---- 1262 query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE 'h_rse%' ---- 50 query I SELECT COUNT(*) FROM lineitem WHERE l_comment LIKE '%h_rse' ---- 50 # NOT LIKE query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE '%a%' ---- 105580 query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE 'h%' ---- 588270 query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE '%a' ---- 563861 # with underscore query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE '%a_%' ---- 114512 query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE 'a_%' ---- 563657 query I SELECT COUNT(*) FROM lineitem WHERE l_comment NOT LIKE '%_a' ---- 563861