有时我们会对三个表做连接。
力扣180:
select distinct l1.Num as ConsecutiveNums from Logs l1,Logs l2,Logs l3 where l1.Num = l2.Num and l1.Num = l3.Num and l1.Id = l2.Id-1 and l1.Id = l3.Id-2
力扣1280:
力扣1440:
select e.left_operand,e.operator,e.right_operand, case when e.operator='>' and v1.value>v2.value then 'true' when e.operator='='and v1.value=v2.value then 'true' when e.operator='<'and v1.value<v2.value then 'true' else 'false' end as value from Expressions e left join Variables v1 on e.left_operand=v1.name left join Variables v2 on e.right_operand=v2.name
---A join B on ... join C on ... ;A join B join C on ... on ...
标签:...,join,value,三表,Num,l1,operator,综训 From: https://www.cnblogs.com/peitongshi/p/16750532.html