2017-02-20 56 views
0

我有下面的MSSQL查询,我无法弄清楚Korma实体。请大家帮帮忙Hele将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

SQL科尔马文档网站包含子查询sample

;; Subselects can be used as entities too! 
(defentity subselect-example 
    (table (subselect users 
      (where {:active true})) 
     :activeUsers))