select max(年龄) as 最大年龄 from 被搜索表 where 工号 > 100 into cursor 结果表 按号段分的话,不知你分段规则或依据是怎样的,假设增量 100 为一段,大概这样:ni = 100 select Int(工号/ni)*ni as 从 ; , (Int(工号/ni)+1)*ni-1 as 到 ; , max(年龄) as 最大年龄 ; from 被搜索表 ; group by 从, 到
select max(年龄) as 最大年龄 from 被搜索表 where 工号 > 100 into cursor 结果表
ni = 100 select Int(工号/ni)*ni as 从 ; , (Int(工号/ni)+1)*ni-1 as 到 ; , max(年龄) as 最大年龄 ; from 被搜索表 ; group by 从, 到
2,722
社区成员
29,108
社区内容
加载中
试试用AI创作助手写篇文章吧