Forum Replies Created

Viewing 5 posts - 1 through 6 (of 6 total)

  • RE: Query Help V2

    HanShi (7/15/2013)


    This code will give you the extra column with the first day of the month. I've calculated this with DATEADD combined with the DATEPART of [TimeStamp] and the...

  • RE: Query Help

    OK, it seems i must have confused the whole thing. I managed to just solve it

    SELECT MeterID, COUNT(TimeStamp) AS Count, SUM(WattHours) AS WattHours, MONTH(TimeStamp) AS...

  • RE: Query Help

    each meter report watthours every 30mins, so in a 30 day month there are 1440 entries. 😀

    So i Count the TimeStamp colum to get 1440.

    Sorry i did a really bad...

  • RE: Query Help

    Thank you for your response 😀

    I tried Adding the Month to the Group by, and now its returning

    Meter ID ...

  • RE: Query Help

    Oh im a idiot :doze:

    Amend my previous.

    SELECT MeterID, COUNT(TimeStamp) AS Count, SUM(WattHours) AS WattHours

    FROM dbo.NewvMData

    GROUP BY MeterID

    HAVING ...

Viewing 5 posts - 1 through 6 (of 6 total)