var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to combine two rows into one row with same ID?
I have a data that needs to be arranged from two rows into one row as follow:
From two rows into -->
ID X Text
1234 1 abc
1234 2 xyz
One row -->
ID Text1 Text2
1234 abc xyz
If field X=1, then Text needs be put into field Text1 and if X=2, then Text needs to be put into Text2.
So how I can do that? I think I need to use CASE function somehow?
, MAX(CASE WHEN x = 1 THEN text ELSE NULL END) AS text1
, MAX(CASE WHEN x = 2 THEN text ELSE NULL END) AS text2