我试图解决这个SQL问题。 例如我有这个:
A1 TIER DATE
TRY10,49 Tier 7 01/01/2013
TRY104,99 Tier 51 01/07/2015
TRY104,99 Tier 54 01/01/2013
TRY1049,99 Tier 84 01/01/2013
TRY11,19 Tier 6 01/01/2013
TRY111,99 Tier 55 01/01/2013
TRY111,99 Tier 52 01/07/2015
当一行的A1等于另一行的A1时,我想只选择层数较小的行。
例如,第二行的A1等于第三行的A1。 所以我只想要第二行,因为第51层<第54层。
因此查询应该成为:
A1 TIER DATE
TRY10,49 Tier 7 01/01/2013
TRY104,99 Tier 51 01/07/2015
TRY1049,99 Tier 84 01/01/2013
TRY11,19 Tier 6 01/01/2013
TRY111,99 Tier 52 01/07/2015
答案 0 :(得分:0)
使用此查询:
Thread(GUI){
VideoStream stream = new VideoStream;
CallWorkerThread(stream);
}
Thread(Worker){
CreateStreamData();
return data;
}
答案 1 :(得分:0)
试试这个
4096x4096x4096
答案 2 :(得分:0)
您可以尝试此查询。这足以满足你的条件。
SELECT b.nm,
b.tr,
b.dt
FROM
(SELECT a.nm,
a.tr,
a.dt,
row_number() over(partition BY a.nm order by to_number(trim(SUBSTR(a.tr,5,LENGTH(a.tr))))) rnk
FROM
(SELECT 'TRY10,49' AS nm,
'Tier 7' AS tr,
to_date('01/01/2013') AS dt
FROM dual
UNION
SELECT 'TRY104,99' AS nm,
'Tier 51' AS tr,
to_date('01/07/2015') AS dt
FROM dual
UNION
SELECT 'TRY104,99' AS nm ,
'Tier 54' AS tr,
to_date('01/01/2013') AS dt
FROM dual
UNION
SELECT 'TRY1049,99' AS nm,
'Tier 84' AS tr,
to_date('01/01/2013') AS dt
FROM dual
UNION
SELECT 'TRY11,19' AS nm, 'Tier 6' AS tr, to_date('01/01/2013') AS dt FROM dual
UNION
SELECT 'TRY111,99' AS nm,
'Tier 55' AS tr,
to_date('01/01/2013') AS dt
FROM dual
UNION
SELECT 'TRY111,99' AS nm,
'Tier 52' AS tr,
to_date('01/07/2015') AS dt
FROM dual
)a
)b
WHERE b.rnk = 1;