Modeling the query for q

Content-Disposition: inline Hello,

I have come across this query in TPC-E benchmark:

select CA_ID,  CA_BAL,  ifnull((sum(HS_QTY * LT_PRICE)),0)
from CUSTOMER_ACCOUNT left outer join HOLDING_SUMMARY on HS_CA_ID = CA_ID, LAST_TRADE
where CA_C_ID = cust_id and LT_S_SYMB = HS_S_SYMB
group by CA_ID, CA_BAL
order by 3 asc

Here, I see two issues:
a) the from clause has a three tables –> which should I choose as the target table for q query?
b) LT_S_SYMB & HS_S_SYMB do not have any relationship

Any suggestions?

Regards,
Yuva