mssql query

sum multiple price between 2 dates

Page 1 of 1

1 Replies - 816 Views - Last Post: 05 July 2009 - 08:17 AM

#1 ardagurman   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-June 08

mssql query

Post icon  Posted 05 July 2009 - 08:10 AM

i want to calculate totals of column in given days.
what is the mssql query
single double triple child1 child2 startdate enddate hotelid
$15 $10 $25 $7 $5 07.01.09 07.10.09 1
$16 $11 $26 $8 $6 07.11.09 07.20.09 1
$17 $12 $27 $9 $7 07.21.09 07.31.09 1

if i choose dates between 07.18.09 and 07.23.09 how will i find the result

total row for dates (5 nights)
single double triple child1 child2 startdate enddate hotelid
$82 $57 $132 $42 $32 07.18.09 07.23.09 1

thank you
best regards.

Is This A Good Question/Topic? 0
  • +

Replies To: mssql query

#2 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1660
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: mssql query

Posted 05 July 2009 - 08:17 AM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1