I want to get the result: time2, all time1 & lt; The number of=time2 a1
CodePudding user response:
Is time less than the time of all time2 time1?
Select count (a1) from a Where time1 & lt;=(select min (time2) from b);
CodePudding user response:
A table should be: type1 and type2, a1, time1 Table B: time2 Get the result: type1 and type2, time2, time1 & lt;=time2 and type1=a.t ype1 and type2=a.t ype2 by the number of a1