这个查询在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?