Home > database >  How in a SQL inside a field check a data, overall check a batch of data?
How in a SQL inside a field check a data, overall check a batch of data?

Time:10-09

Now there is a demand, that is, I want to be in a field, the last day of the date (the only value) such as 7.23 today, then the date of the overall 7.1 7.23 summary, I may be could you tell me how to write the SQL the

CodePudding user response:

Depends on you what is the condition that the only value, maximum value, for example

Select *, (select Max (someTimeCol) from the table where conditions) maxTime from table
Where conditions

CodePudding user response:

I think the second floor of positive solution is a solution of + 1
  • Related