当前位置:网站首页>Thirty nine - SQL segment / group summary of data content

Thirty nine - SQL segment / group summary of data content

2022-06-09 10:37:00 BerryBC

1. This moment

The heart is not beating quietly , Do not care about the existence of the former and the latter , Is the same , Or not beautiful .
Brownian motion is a lovely soul Release , It's like a string of five moons in the sky , It is not without loveliness .

2. Why bother to say

Within words And Beyond words Everything , Such as origin and Between objects The relationship between , If we have to The current number degree By the number of changes , How passive .
stubborn Beyond words .
Within words, for example :SQL Statement query age segment grouping query
Ruocha Numerous numbers Or to The number of Dharma changes Why Never say

3. Beyond words

3-1) Are divided into segments

SELECT Round([Sales]/100,0)*100 AS SalesBin, Count(Data.Sales) AS CountOfSales
FROM Data
GROUP BY Round([Sales]/100,0)*100;

All in paragraphs , So Hundred points , One suit is different said , Get it in different numbers , Fortunately .

3-1) There are several paragraphs from it

I have a mode like :

creat table Bin
Level	MinValue
1	40
2	36
3	32
4	27
5	22
6	17
7	13
8	9
9	6
10	4
11	2
12	1

In other words :

SELECT Bin.Level, Bin.MinValue, Count(Data.[Sales]) AS [CountOfSales]
FROM Bin, Data
#  If not , Do not add 
WHERE (((Data.Sales)<[Bin].[MinValue] And (Data.Sales)>0))
# ------
GROUP BY Bin.Level, Bin.MinValue;

Get one with Level Subject matter Add up Number of .

4. If there is any celebration , Then think and think with luck

A thousand lines will be finished in a few minutes , innumerable What happened , can Table depots also .
Rules are to the world , Not with special skills .

原网站

版权声明
本文为[BerryBC]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090959012914.html