Sql, GROUP BY interval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hachka
    New Member
    • Aug 2010
    • 3

    Sql, GROUP BY interval

    Hi all,

    I'm a french guy, I have 18 years and I don't speak very well english, so excuse me in advance.

    My matter is :

    I have a database with some people register,

    I would create a sql request to group by 5 minutes interval the number of registration since 10 years.

    And I don't know how I can make that.

    Thanks for all.
    Hachka
  • hachka
    New Member
    • Aug 2010
    • 3

    #2
    Nobody can help me ?

    Comment

    • mwasif
      Recognized Expert Contributor
      • Jul 2006
      • 802

      #3
      Can you please explain your problem with an example?

      Comment

      • hachka
        New Member
        • Aug 2010
        • 3

        #4
        Hi

        Sorry for the delay,

        an example :

        the data base :


        id date

        1 11/05/2001 11h55m32s
        2 11/05/2001 11h56m17s
        3 11/05/2001 11h57m25s
        4 11/05/2001 11h57m08s
        (...)
        19 05/12/2004 19h36m29s
        20 05/12/2004 19h37m15s
        21 05/12/2004 19h38m37s
        (...)
        22 12/08/2010 15h08m18s
        23 21/08/2010 15h12m38s


        I would save in an other database in this form :

        id date number of subscrib

        1 11/05/2001 11h55 4
        (...)
        5 05/12/2004 19h35 3
        (...)
        10 12/08/2010 15h05 1
        (...)
        12 12/08/2010 15h10 1

        the date mean (time between date and date + 5 min)

        thanks a lot

        Comment

        Working...