简体   繁体   中英

Custom aggregation function in Sqlite

Is it possible (and how) to make custom aggregation in SQLite? I need to transform query which normally returns rows like

aaa | 12 | ...
bbb | 45 | ...

but should return now something like

aaa=12, bbb=45 | ...

ie to "aggregate" rows with some custom concatenation. So, is it possible even to concatenate columns of rows?

我想你想要group_concat()

select group_concat(col1 || '=' || col2, ', ')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM