Table 1:
Table 2:
CodePudding user response:
select al-qeada oodsId, Amy polumbo artsId, a.n umber * b.q uantity
The from (
Your first query here
), a (
Your second query here, query the sum (quantity) as quantity after
B)
Where al-qeada oodsId=b.g oodsId
CodePudding user response:
Select *The from (select * from a1 whre XXX) tb1, (select * from a2 whre XXX) tb2
Where tb1. Id=tb2. Id
CodePudding user response:
Be nested, before you write a statement of the results as a table, with a () name, outside in operation, you need connect these two tables have a al-qeada oodsid=b.g oodsid. Can do not exist the connection between the table