SELECT d.id,
       (SELECT    MAX(maxtimes)
          FROM      ( VALUES ( d.t1), ( d.t2),
                    ( d.t3) ) AS times ( maxtimes )
       ) AS times
FROM(
SELECT a.times AS t1, b.times AS t2,c.times AS t3,a.id FROM a
LEFT JOIN  b ON b.id = a.id
LEFT JOIN  b ON a.id = c.id
) d

 

相关文章:

  • 2021-11-13
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2021-12-10
相关资源
相似解决方案