Skip to content
Advertisement

SQL – How to calculate product discount and get products where discount is greater than 25?

I want to calculate discount in SQL query and want to get products having discount greater than 25. I am trying with following query. Please correct me what i am doing wrong. Thank you

I am getting following error.

#1054 - Unknown column 'p_discont' in 'where clause'

Advertisement

Answer

use inline condition in where clause

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement