SELECT
daf.id as affiliate_id,
daf.name as affiliate_name,
dal.name as allocation_name,
dal.id as allocation_id,
dal.allocation,dal.price
FROM
degreeamerica.affiliates daf, degreeamerica.allocations dal
JOIN
(select pap.lead_price,pap.live, pap.allocation_id,pap.affiliate_id from paul.affiliates_price pap) pafp
ON (dal.id=pafp.allocation_id and daf.id=pafp.affiliate_id)
ORDER BY daf.id;
问题:取消on子句中的列daf.id 我有这个专栏,但它仍然是未知专栏。请帮忙!!!!
答案 0 :(得分:0)
我相信mySQL你可以通过该字段的别名来订购。
ORDER BY affiliate_id;