I am little new in mysql database. My query is like this and its working fine
SELECT visitor_sent * 100 / visitor_quantity as percentage FROM `tbl_orders` WHERE oid =15
But I want it extend to use percentage variable in where clause but its not working.
SELECT visitor_sent * 100 / visitor_quantity as percentage FROM `tbl_orders` WHERE oid =15 AND percentage < 20
its giving me unknown column percentage error. Let me know if anyone here can help me for correct the query.
Thanks!