Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在SQLite中,当我有一列出生日期时,我会尝试按当前年龄计算人数_Sql_Sqlite - Fatal编程技术网

在SQLite中,当我有一列出生日期时,我会尝试按当前年龄计算人数

在SQLite中,当我有一列出生日期时,我会尝试按当前年龄计算人数,sql,sqlite,Sql,Sqlite,在SQLite中,当我有一列出生日期时,我会尝试按当前年龄计算人数 e、 g 年龄:---------------计数: 17------------------4 18------------------7 19------------------6 等等 非常感谢, Z尝试此查询: select age,count(age) FROM (select strftime('%Y',Date('now')) - strftime('%Y',birth) age from table1)t gro

在SQLite中,当我有一列出生日期时,我会尝试按当前年龄计算人数

e、 g

年龄:---------------计数:

17------------------4

18------------------7

19------------------6

等等

非常感谢,

Z

尝试此查询:

select age,count(age) FROM
(select strftime('%Y',Date('now')) - strftime('%Y',birth) age
from table1)t
group by age;

关于这个话题,你打算多久问一次几乎相同的问题?