Good day!
Help with the request.
There are 3 tables with data of the form:
id1 | name | 1 | var1 | 2 | var2 | id2 | id1 | note 1 | 1 | asd 2 | 1 | asd 3 | 2 | dsa id3 | id1 | text 3 | 1 | asdf 4 | 1 | fsds 5 | 2 | as44
It is necessary to select rows from the 1st table ( id1
, name
) and rows connected by id1 from the second and third tables, but in order to select from the second table the row with the maximum id2, and from the third with the maximum id3.
Accordingly, 1 record from table 1 should correspond to 1 record from table 2 and 1 record from table 3.
Can this be done with 1 query?
Thank.