Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能用 jpql 语法编写这个 sql?
SELECT SUM(t1.preise) FROM ( SELECT preise FROM `preistabelle` ORDER BY `pid` DESC LIMIT 6 ) as t1
它是一个子选择。如果我尝试这样的事情,我会得到一个错误:
SELECT sum(t1.preise) FROM (SELECT a.totalGRP FROM preise a) as t1
错误是意外令牌“(”
你不能。JPQL 不支持它。