Oracle SQL でエラーが発生しました:
ORA- 01427単一行のサブクエリが複数の行
を返します
その場所。
これが私のテーブルです
VID MILEAGE LOCATION VSIZE TRANSMISSION
----------------------------------------------------------------------
V-101 70 AHMD COMPACT AUTOMATIC
V-102 50 SURAT COMPACT AUTOMATIC
V-103 10 AHMD MID-SIZE MANUAL
V-104 30 AHMD MID-SIZE AUTOMATIC
V-105 15 VADODARA FULL-SIZE AUTOMATIC
V-106 20 AHMD LUXURY AUTOMATIC
V-107 50 AHMD LUXURY MANUAL
そして、これは私のクエリです:
SELECT location, transmission, mileage FROM vehicles_workshop
WHERE transmission = 'MANUAL' AND mileage =
( SELECT DISTINCT mileage FROM vehicles_workshop WHERE mileage <
(SELECT MAX(mileage) FROM vehicles_workshop WHERE vsize = 'LUXURY')
);