In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Three query knowledge
Note: the following query is based on the list of goods on the ecshop website (ecs_goods).
In practice, you can take only part of the columns for easy viewing.
1: exercise for basic query where:
Identify goods that meet the following conditions
1.1: goods with a primary key of 32
Db.goods.find ({goods_id:32})
1. 2: all goods not in column 3 ($ne)
Db.goods.find ({cat_id: {$ne:3}}, {goods_id:1,cat_id:1,goods_name:1})
1.3goods priced above 3000 yuan in our store {$gt}
Db.goods.find ({shop_price: {$gt:3000}}, {goods_name:1,shop_price:1})
Goods whose price is less than or equal to 100RMB in our store ($lte)
Db.goods.find ({shop_price: {$lte:100}}, {goods_name:1,shop_price:1})
1.5: take out the goods in column 4 or 11 ($in)
Db.goods.find ({cat_id: {$in: [4Jing 11]}}, {goods_name:1,shop_price:1})
1.6: take out 100
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.