-- ============================================================ -- Select 查询操作测试 -- ============================================================ -- 1. 全表查询 select * from /test/aaa/test_basic /** output() match("insert_001","hello world 测试数据") **/ ; -- 2. 等值查询 select * from /test/aaa/test_basic where name='insert_001' /** output() count(1) match("v_int","100") **/ ; -- 3. 多字段条件查询(AND) select name, v_int, v_bool from /test/aaa/test_basic where name='insert_001' and v_int=100 /** output() count(1) **/ ; -- 4. OR 条件查询 select * from /test/aaa/test_basic where name='insert_001' or name='insert_002' /** output() count(2) **/ ; -- 5. 大于条件查询 select name, v_int from /test/aaa/test_basic where v_int>10 /** output() **/ ; -- 6. 小于条件查询 select name, v_int from /test/aaa/test_basic where v_int<0 /** output() match("insert_004") **/ ; -- 7. 大于等于条件 select name, v_int from /test/aaa/test_basic where v_int>=100 /** output() **/ ; -- 8. 不等于条件 select name, v_int from /test/aaa/test_basic where name!='insert_001' /** output() **/ ; -- 9. 查询 bool 字段 select name, v_bool from /test/aaa/test_basic where v_bool=true /** output() match("insert_001") **/ ; select name, v_bool from /test/aaa/test_basic where v_bool=false /** output() **/ ; -- 10. 带 LIMIT 的查询 select * from /test/aaa/test_basic limit 3 /** output() count(3) **/ ; -- 11. 查询不存在的记录 select * from /test/aaa/test_basic where name='non_exist_key_99999' /** output() count(0) **/ ; -- 12. 查询 version 表 select * from /test/aaa/test_basic_ver where name='ver_001' /** output() count(1) **/ ; -- 13. 查询 float/double 字段 select name, v_float, v_double from /test/aaa/test_basic where name='insert_001' /** output() **/ ; -- 14. 查询 bigint 字段 select name, v_bigint from /test/aaa/test_basic where name='insert_003' /** output() match("v_bigint","9223372036854775807") **/ ;