I have not tried this yet but thought I would ask the experts first. Is it possible to have a query where part of the order by clause is a multiplication of 2 columns?
What I mean is:
SELECT * FROM table WHERE column1 = "some condition" ORDER BY date_added DESC, (column2 * column3) ASC, another_order DESC"
I need to order my results based on the answer of 2 columns being multiplied together.
Cheers!
Tried this and it works…
For the SQL
Output
Fiddle: http://www.sqlfiddle.com/#!2/b19a4/3