0

Query :

SELECT  currency,alert_level,side, 
range_start,range_end      FROM   
AESFX_ALERT_CONFIG order by 
Side,Alert_Level

outputs

output

But I want output like this:

enter image description here

I have tried CASE but that doesnot solves my problem.

Strawberry
  • 33,750
  • 13
  • 40
  • 57
  • This type of query is called a pivot. It *can* be done in SQL, but I think issues of data display are best left to application code – Strawberry May 20 '16 at 05:53

1 Answers1

0

Use the group by side, alert predicate in your select

see https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html

Louis
  • 2,854
  • 2
  • 19
  • 24