This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
自己写了一个app,在造数据进行测试时,发生了一件升起的事情 | |
如下图: | |
b是由a-i*86399999得到,二者均为long类型 | |
但发现在86399999这个数字后如果不加l,会发生以下事件 | |
b居然比a大! | |
我是这样发现的:一开始我并没有加L,后面猜测会不会是long和int加减的问题,遂在86399999后加了这个L | |
注释一下:86399999是一天24小时总共的时间戳,我为了生成每天的数据弄的这个值 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
有一个销售记录表 包含了一些如下的内容 | |
name money date | |
(名称) (销售总额金额) (日期) | |
商品 A 100 2019 年 7 月 25 日 | |
商品 B 200 2019 年 7 月 25 日 | |
商品 C 300 2019 年 7 月 25 日 | |
商品 A 6600 2019 年 7 月 24 日 | |
商品 B 99800 2019 年 7 月 24 日 | |
最后想实现的是:通过 select name,sum(money) from Table where date>'2019 年 7 月 23 日' group by name desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java | |
asdoasjdl askj sad asd as |