Skip to content
Advertisement

Oracle SQL return column calculated from existing columns

I have the above SQL query which returns the columns name, X and Y. I would like to return one more column (lets call it Z) which gives the value of X/Y but not too sure how to do this – I tried writing (X/Y) Z but no luck – any suggestions?

Advertisement

Answer

  • Use CTE
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement