Hello,
Could anyone help me with a query please ?
I have to match 2 tables, something like this :
select *
from table1 A
where A.fieldA in (select B.fieldA
from table2 B
where A.id = B.id)
My problem is when I want to select a row in the Table2. I want to choose of the table2 the row that contains the biggest date and the biggest value of the field B.
Something like this
select *
from table1 A
where A.fieldA in (select B.fieldA
from table2 B
where A.id = B.id
order by B.date and B.FieldB
fetch first 1 row only)
but it doesn't work...
Thanks in advance !