The select a.a az635, b.a az636, a. *, b. * FROM ep61 a
The join ep62 b
On a.a az635=b.a az635
Where 1=1
And b.a ae601 in (' 1 ', '0')
And a.a ae596 & lt;> '0'
And b.a ae599='4028 c69b6dafde16016db36937350012'
CodePudding user response:
Complete: select ep. *The from (select a. *,
B. *,
Row_number () over (partition by a.a az635 order by b.a az636 desc) sdafsda
The FROM ep61 a
The join ep62 b
On a.a az635=b.a az635
Where 1=1
And b.a ae601 in (' 1 ', '0')
And a.a ae596 & lt;> '0'
And b.a ae599='4028 c69b6dafde16016db36937350012) ep where ep. Sdafsda=1