【发布时间】:2018-12-26 11:58:47
【问题描述】:
我必须在 Postgresql 的另一个 Select 中执行此查询:
SELECT COUNT(tn.autoship_box_transaction_id)
FROM memberships.autoship_box_transaction tn
WHERE tn.autoship_box_id = b.autoship_box_id
我必须使用子句WITH 吗?
【问题讨论】:
-
您能否分享一下您打算如何应用此查询? sql查询有多种组合方式,CTE(又名WITH子句)当然是其中之一。
标签: sql postgresql select with-statement