1
votes

HI I NEED SOME HELP BECAUSE I WANT TO GET GET THE ALL THE VALUE. THIS IS THE EXAMPLE

TABLE 1

202110 5

TABLE 2

202105 2 
202105 5
202106 6
202107 3
202108 3
202108 4
202108 5
202111

SO THE TABLE 1 HAVE 1 ROW THE 202110 HE WILL NOW CHECK IN THE TABLE 2 IF HE HAVE 202110 IF NOT HAVE 202110 HE WILL NOW GET THE LESS THAN THE 202110 AND ALL THE MAX THAT AT THE LASTEST VALUE OF THE TABLE 2 THAT MEANS ALL THE 202108

WHAT IS THE QUERY SHOULD I USE?

Absolutely unreadable. Format your question carefully. - Akina
What's the second column in the tables and what do they have to do with your requirement. Please add expected outcome. - P.Salmon