0

My table looks like

ID        Name      Revenue
A1|A2     ABC       4
A3|A2|A1  XYZ.      9
A1.       IJK.      2
A1|A3.    DEF.      1

My output should be

ID  Name  Revenue
A1. ABC  2
A2. ABC  2
A3. XYZ  3
A2. XYZ  3
A1. XYZ  3
A1. IJK  2
A1. DEF  0.5
A3. DEF  0.5

How can I achieve this

Yash
  • 105
  • 10
  • 1
    I linked this to a duplicate question from 2013. The complexity of those solutions should serve as a caution against storing data this way, if you want to use it as if it is stored in multiple rows. Just store it in a normalized manner, and make it easier on yourself! – Bill Karwin Mar 03 '20 at 01:59
  • But this link does not provide how to calculate the average after breaking the ID's. This question is actually not the duplicate of the link you mentioned. – Yash Mar 03 '20 at 02:10
  • Then store the data in a normal format, so you can solve the query. – Bill Karwin Mar 03 '20 at 02:13

0 Answers0