Data-mysql obtains the number of consecutive values

Source: Internet
Author: User
! IMG (img.ask.csdn.netupload201507291438173228_28446.png). I want to obtain the maximum Dalian value of each field in the mysql data table. for example, the three consecutive values in the field num_1_x are all 0; I want to display num_1_x the number 0 in a row, that is to say, I want to get the number of consecutive occurrences of num_1_x 3. is there any such method in mysql? Mysql data


Let me talk about my needs;
I want to obtain the maximum number of Dalian values for each field in the mysql data table. for example, the three consecutive values in the field num_1_x are all 0. I want to display the number 0 consecutively for num_1_x, that is to say, I want to get the number of consecutive occurrences of num_1_x 3. is there any such method in mysql?

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.