我有以下MSSQL查询,我无法弄清楚Korma实体。请帮忙
select t.d as did from (
select dataid as d , count(dataid) as
cd from <table_name>
WHERE prid = <pid> group by dataid
) as t WHERE t.cd >1;
由于
答案 0 :(得分:0)
SQL Korma文档网站包含 subselect sample:
;; Subselects can be used as entities too!
(defentity subselect-example
(table (subselect users
(where {:active true}))
:activeUsers))