这是我的项目表
Project Table
JNo Name City
J1 Proj1 London
J2 Proj2 Paris
J3 Proj3 Athens
J4 Proj4 India
这是我的货运表
Shipment
SNo PNo JNo Qty
S1 P1 J1 50
S1 P1 J2 90
S1 P2 J1 40
S1 P3 J3 20
S2 P1 J3 110
S2 P2 J2 30
S2 P4 J3 10
S2 P3 J1 100
S3 P1 J3 80
S3 P4 J2 70
S3 P4 J2 70
S4 P1 J3 20
S4 P2 J1 60
select min(qty) from shipment where jno IN(select jno from project)
最佳答案
select p.name from Project p,Shipment s where s.JNo=p.JNo and s.Qty in (select min(qty) from shipment)