如何在 jooq 中编写此查询
select sum(x.amt) from (select amount as amt from user_transactions where TransactionTimeStamp > '2022-03-09') as x
我无法将此 sql 查询转换为 jooq 查询。请帮忙
select sum(x.amt) from (select amount as amt from user_transactions where TransactionTimeStamp > '2022-03-09') as x
I am not able to convert this sql query to jooq query. Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建派生表
您可以创建派生表< /a> 像这样:
然后像这样使用它:
替代使用
FILTER
jOOQ 支持标准 SQL
过滤
子句,并且也可以为 SQL Server 模拟它:如果您是 在单个查询中聚合多个内容,例如使用不同的过滤器
Creating derived tables
You can create derived tables like this:
And then use it like this:
Alternative using
FILTER
jOOQ supports the standard SQL
FILTER
clause, and can emulate it also for SQL Server:This is especially useful if you're aggregating several things in a single query, e.g. with different filters