need sql help please...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • boobookittyphuck@gmail.com

    #1

    need sql help please...

    Is there a way to achieve this through SQL.....I want to be able to
    have my output look like this:

    1/1/05 20:00 2.5 units
    1/1/05 21:00 5.5 units
    1/1/05 22:00 3 units
    1/1/05 23:00 1 unit
    [color=blue]
    >From a table that looks like this:[/color]

    startDateTime totalMinutes units
    1/1/05 20:00 120 5
    1/1/05 21:00 140 7

    Basically, it's an hourly breakdown, but I want the time that is
    overlapping to be grouped.

    any help would be appreciated. If I need to add an EndDateTime, that's
    not a problem...I just don't know where to start.

  • Aggro

    #2
    Re: need sql help please...

    boobookittyphuc k@gmail.com wrote:[color=blue]
    > Is there a way to achieve this through SQL[/color]

    I suggest that you do that calculation on the application side, since
    that would be much easier AFAIK.

    Comment

    Working...