答案 0 :(得分:0)
不确定你会对这些数据做什么,但这是查询:
SELECT vp.PRODUCT_ID, vv.VENDERS, vs.CUSTOMERNAME
FROM vna_sales vs
JOIN vna_products vp ON vs.ORDERID = vp.ORDERID
JOIN vna_venders vv ON vp.VENDER_ID = vv.VENDER_ID
WHERE vv.VENDERS <> vs.CUSTOMERNAME
答案 1 :(得分:0)
请试试这个
SELECT *
FROM vna_shipments a
inner join vna_parts b on a.id = b.id //some joing factor
inner vna_suppliers c on a.id = c.id //some joing factor
inner vna_projects d on a.id = d.id //some joing factor
group by vendor_id, customer_id
order by vendor_id desc