在sqlite中查找电影的最小和最大长度

时间:2021-01-28 11:52:07

I need to find the min and max length out of several hundred movies in a sqlite table. I've never done this before.

我需要在sqlite表中找到几百部电影的最小和最大长度。我以前从未这样做过。

SELECT * FROM movies WHERE length = ?

The columns include id, name, length, director. Length is shown as 1:45:00.

列包括id,name,length,director。长度显示为1:45:00。

1 个解决方案

#1


0  

Assuming LENGTH is stored as a numeric type, generally you would do this for all numerics:

假设LENGTH存储为数字类型,通常您会对所有数字执行此操作:

select min(length), max(length) from movies

#1


0  

Assuming LENGTH is stored as a numeric type, generally you would do this for all numerics:

假设LENGTH存储为数字类型,通常您会对所有数字执行此操作:

select min(length), max(length) from movies