I have a table with these columns: ID, Price, IsMonthlyPrice
How can I select all and sort by weekly price, taking into account that:
if (IsMonthlyPrice = false) then Price is weekly
EDIT:
I need to sort by weekly price
weekly price of a monthly price would be: Price*12/52
You don’t need to include the calculation twice. You can order on the column number