In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How does mysql count the number of people in each major score segment? The following will be introduced in detail by the editor.
1. My watch structure
Student_info | id | name | profession | score | |-| id | name | score | Specialty |
two。 Statistics by fractional segment
400 to 500 people, 300 to 400 people
Selectcount (case when score between 400 and 500 then 1 end) as 400 to 500 and count (case when score between 300 and 400 then 1 end) as 300 to 400from student_info
3. Statistics by score segment and specialty
400 to 500 people, 300 to 400 people
Selectcount (case when score between 400 and 500 then 1 end) as 400 to 500 and count (case when score between 300 and 400 then 1 end) as 300 to 400from student_info GROUP BY profession
4.sql dynamic splicing generation
Int start = 200; int end = 700; int inter = 10; int count = (end-start) / inter; StringBuilder sqlBuilder = new StringBuilder (); sqlBuilder.append ("select"); for (int I = 1teri
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.