【发布时间】:2014-11-14 03:04:40
【问题描述】:
此查询在 PostgreSQL 中有效:
Select ot.MCode,array_to_string(array_agg(tk1.TName || ',' || ot.TTime), ' - ') as oujyu_name_list
From TR_A ot
inner join MS_B tk1 on ot.Code = tk1.Code
Where ot.Code in (Select Code From TR_C )
Group byot.MCode
但它在 SQLite 中不起作用,因为 SQLite 没有 array_agg() 函数。如何将这个查询转换为 SQLite?
【问题讨论】:
标签: postgresql sqlite android-sqlite aggregate-functions