I have a question about merge multiple rows from DB query. For example, query results: id col1 col2 col3 col4 row1 key1 key2 AB 5 row2 key1 key2 ABC 8 Merge condition is: row1.col1= row2.col1 and row1.col2=row2.col2 and row1.col3 like 'AB%' and row2.col3 like 'AB%' Then let row2.col4 = row2.col4+row1.col4. So after merge, output should be: id col1 col2 col3 col4 row2 key1 key2 ABC 13 How can i make it? Appreciate your help!
Hi,
I need solution on the below query.
i have two tables table A, table B
Table A has one column task_id
Table B has two cols task_id,task_status
task_id status
----------- -----------------
10 in progress
10 completed
I need table c to have
task_id history_status
---------- ---------------
10 in progress,completed
thanks
Devashsi