I have joined a few tables together and all seems to work well..
SELECT * FROM products
JOIN underwriters ON (products.underwriter_lookup = underwriters.id_uw)
JOIN countries ON (products.country_lookup = countries.id_co)
JOIN repay_types ON (products.repay_type_lookup = repay_types.id_repay)
JOIN base_rates ON (products.base_rate_lookup = base_rates.base_rates_id)
However, I have been asked if I can now sort some of the output into numerical order.
There is a row in the "Products" table called "initial_rate" which is an INT
In the "Base Rates" Table "base_rates_amount" which is also an INT
What I need to do is sort the query kind of like this to give a total interest rate..
ORDER BY products.initial_rate + base_rates.base_rates_amount
But this doesn't work.
I have been scouring Google for solutions, but the ones I have found are too simplistic and don't include JOINS etc..
This is just beyond my experience right now and would really appreciate any pointers.
Thanks
Mike