我在sqlite中有一个表,其中一列是“A”
A
1
2
3
INF
列“A”被定义为数字。但它是从R读取的,因此INF是无限的R代码。
如何使用SQLite sql获取A的最大值?我试过了
select
max(a)
from
table
where a != INF
和
select
max(a)
from
table
where a != "INF"
正如你在SQLite上看到的那样。
答案 0 :(得分:2)
您可以使用9e999作为Inf
,例如
select
max(a)
from
table
where a != 9e999
答案 1 :(得分:-1)
延伸马修普罗德的答案 <怎么样
select
max(a)
from
table
where a < 9e999