咨询一下, 如何在库中查询lx.FNumber列数据相同时,对应的 t.fipaddress 列数据也相同,但是 ba.fname 列数据不同的所有数据?
SELECT
te.FTenderItemId ZID,
lx.FNumber ZBM,
lx.FName ZMC,
lx.FTenderItemName MC,
t.fid "fid",
t.ftender "ftender",
t.fprojectid "fprojectId",
p.fprojectname "XM",
t.fsupplierid "fsupplierId",
ba.fname "GY",
mr.fid "fmanagerId" ,
mr.fmanager "fmanager",
mr.fmanagerphone "fmanagerPhone",
mr.fidentity "fidEntity",
f.filename "fileName" ,
f.fileurl "fileURL",
f.fid "fileId",
t.fipaddress "fipAddress",
TO_CHAR(t.fisreturntender) "fisReturnTender",
CASE
WHEN t.ftendertime IS NOT NULL
THEN TO_CHAR(t.ftendertime,'yyyy-MM-dd hh24:mi')
ELSE ''
END "ftenderTime",
t.fdeposittype "fdepositType"
FROM sm_ine_returntenderentry t
LEFT JOIN sm_ine_returntender te
ON t.fparentid=te.fid
LEFT JOIN sm_bae_project p
ON p.fid=t.fprojectid
LEFT JOIN sm_dot_supplierbasedata ba
ON ba.fid=t.fsupplierid
LEFT JOIN sm_dot_suppliermanagerentry mr
ON t.fmanagerentryid=mr.fid
LEFT JOIN sm_bae_file f
ON mr.fid =f.fbillid
left join SM_INE_TenderItem LX on lx.fid=te.FTenderItemId