In the context of my previous question, I asked a few hours ago: -
Extract multiple similar rows for each individual column type
Some helpful guys gave me a reasonable solution to my problem. I matched the solution in my database table, which is almost the same as the dummy table I developed for this question. But, unfortunately, the query gives the wrong output in my source table. I believe this is a quick fix, and I cannot detect it.
The solution given to me by some useful SO users: -
http://sqlfiddle.com/#!2/0472b/1
After I displayed the solution: -
http://sqlfiddle.com/#!2/082d9/1
The correct output for my table would be: -
+---+--------------+-------------------------------+--------------+-------------+-----+ | d | Johnny Bravo | August, 27 2013 00:00:00+0000 | NAB | Same Amount | 150 | +---+--------------+-------------------------------+--------------+-------------+-----+ | d | Courage Dog | August, 27 2013 00:00:00+0000 | Commonwealth | Same Amount | 150 | +---+--------------+-------------------------------+--------------+-------------+-----+
This question is more like bitmaps :D
source share