Query the number of times in the array after the database, and achieve the effect shown in the figure below?

Source: Internet
Author: User
Service_channel is the complaint channel, the number of complaints (c), and the number of complaints should be the same (count (t) times and). how can we achieve the effect of the following figure through multiple complaint channels? Ignore details .. thank you, pai_^ 0 & amp; gt; {code ...} 1 & amp; gt; {code ...} 2 & amp; gt; {code ...} 3...

Service_channel is the complaint channel, the number of complaints (c), and the number of complaints should be the same (count (t) times and). how can we achieve the effect of the following figure through multiple complaint channels? Ignore details... thank you ^_^
0 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

1 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

2 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

3 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

4 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

5 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

6 =>
13 =>

Array (size = 4) 'C' => string '6' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

14 =>

Array (size = 4) 'C' => string '6' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

15 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

16 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

17 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

18 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

19 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

20 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

Reply content:

Service_channel is the complaint channel, the number of complaints (c), and the number of complaints should be the same (count (t) times and). how can we achieve the effect of the following figure through multiple complaint channels? Ignore details... thank you ^_^
0 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

1 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

2 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

3 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

4 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

5 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '12' (length = 2)

6 =>
13 =>

Array (size = 4) 'C' => string '6' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

14 =>

Array (size = 4) 'C' => string '6' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

15 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

16 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

17 =>

Array (size = 4) 'C' => string '4' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

18 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

19 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

20 =>

Array (size = 4) 'C' => string '2' (length = 1) 'create _ time' => string '2017-08-04 '(length = 10) 'archivepath _ name' => string '1day' (length = 75) 'service _ channel' => string '29' (length = 2)

Select create_time, service_channel, c, count (*) as 'Count 'from a group by create_time, service_channel, c

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.