Time:09-18
CodePudding user response:
put LHQ + ck + SFQ and compare
case when LHP & gt; Lag (LHP) over (partition by the name the order by nd) or LHP & gt; Lag (ck) over (partition by the name the order by nd) or LHP & gt; Lag (SFQ) over (partition by the name the order by nd) Then 'add' The else 'end
SELECT t. *, (SELECT DECODE (COUNT (0), 0, 'not' AND 'add') FROM table_name WHERE tt tt. The name=t.n ame AND tt. Nd - 1=t.n d AND (tt) LHQ & lt; T.l hq OR tt. Ck & lt; Tc k OR tt. SFQ & lt; T.s fq) z The FROM table_name t ORDER BY t.n ame, t.n d;
Quote: refer to the fifth floor AHUA1001 reply: SELECT t. *, (SELECT DECODE (COUNT (0), 0, 'not' AND 'add') FROM table_name WHERE tt tt. The name=t.n ame AND tt. Nd - 1=t.n d AND (tt) LHQ & lt; T.l hq OR tt. Ck & lt; Tc k OR tt. SFQ & lt; T.s fq) z The FROM table_name t ORDER BY t.n ame, t.n d; Thank you I also tried this seems not to you...
Page link:https//www.codepudding.com/database/9059.html