implement PIVOT in MySQL -
Hi I am a Java programmer and working on a project with MySQL DB. According to the requirement I need to implement SECL in SEL. I have PIVOT functionality in SQL but does not support MySQL axis. Either way can I change my own SQL to get the output in MYSQL?
D2_X as D1, [X] as D2_Y, [Y] as D2_Y FROM (SELECT D1, D2, A to F) in PiVOT (SM (A) ) PVT
for D2 ([x], [y]) Select D1, SM (IF (D2 = '[x]', A, 0)) as [x], as SM (IF (D2 = '[Y]), A, 0 )) As [Y] F group D1
Comments
Post a Comment