How does java or sqlServer automatically determine the time group

Source: Internet
Author: User
@ Mantian de Guang: after a whole day, you just want to get it done in one sentence, right? Basically, it doesn't make sense. If you don't get stuck with an SQL statement, I believe you will soon be able to write code. If the requirement is unclear, the interval is less than 1 minute, or the standard minute isolation is used. (08:57:59 and 08:58:03 are counted as two minutes.) When you make it clear, then

@ Mantian de Guang: after a whole day, you just want to get it done in one sentence, right? Basically, it doesn't make sense. If you don't get stuck with an SQL statement, I believe you will soon be able to write code. If the requirement is unclear, the interval is less than 1 minute, or the standard minute isolation is used. (08:57:59 and 08:58:03 are counted as two minutes.) When you make it clear, then

@ Mantian de Guang: after a whole day, you just want to get it done in one sentence, right?

Basically, it doesn't make sense. If you don't get stuck with an SQL statement, I believe you will soon be able to write code.

If the requirement is unclear, the interval is less than 1 minute, or the standard minute isolation is used. (08:57:59 and 08:58:03 are counted as two minutes) This is when you make it clear, and the sample is not described in the example. How can we process such data?

08:57:59

08:58:03

08:58:12

08:59:02

08:59:50

If it is not more than 1 minute apart, it will continue to be taken until more than 1 minute has elapsed. (Will this description be more accurate, or will it be more difficult to misunderstand ?)

In this case, you can add a field and put the code processing result in the field. Then you can group.

The importance of using an SQL statement or multiple SQL statements is not that strong.

I am opposed to performance-only theory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.