1.查询所有记录db.userInfo.find();相当于:select* from userInfo; 2.查询去掉后的当前聚集集合中的某列的重复数据db.userInfo.distinct("name");会过滤掉 name 中的相同数据相当于:select distict name from userInfo; 3.查询 age = 22 的记录db.userInfo.find({"age": 22});相当于: select * from userInfo…
1.查询所有记录 db.userInfo.find();相当于:select* from userInfo; 2.查询去掉后的当前聚集集合中的某列的重复数据db.userInfo.distinct("name");会过滤掉 name 中的相同数据相当于:select distict name from userInfo; 3.查询 age = 22 的记录db.userInfo.find({"age": 22});相当于: select * from userInf…
23个MySQL常用查询语句 一查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%…
关于MySQL常用的查询语句 一查询数值型数据: ; 查询谓词:>,=,<,<>,!=,!>,!<,=>,=< 二查询字符串 SELECT * FROM tb_stu WHERE sname = '小刘' SELECT * FROM tb_stu WHERE sname like '刘%' SELECT * FROM tb_stu WHERE sname like '%程序员' SELECT * FROM tb_stu WHERE sname like '%…
MongoDB查询语句 --查询近三个月的客户使用量 aggregate:使用聚合 match:过滤 group分组 -- mysql中select org_code as 近三个月使用商户 from pomelo_backend_production.landi_configurations where created_at between '2018-03-22 00:00:00' and '2018-06-22 00:00:00'GROUP BY org_code; --mong…