Hello,
Imagine this simples query:
select 1 as A, 'test1' as B, '' as C
union
select 1 as A, '' as B, 'test2' as C
this returns :
---------------------
| A | B | C |
---------------------
| 1 | test1 | |
---------------------
| 2 | | test2 |
---------------------
But I want to get:
---------------------
| A | B | C |
---------------------
| 1 | test1 | test2 |
---------------------
I tried doing something like:
select t.A, t.B, t.C
from
(
select 1 as A, 'test1' as B, '' as C
union
select 1 as A, '' as B, 'test2' as C
) as t
group by t.A, t.B, t.C
But that doesn’t work… How can I do this?
Thanks in advance!