Show Bid Request
SQL Querys needed
Bid Request Id: 49021
|
|
|
Posted by: |
MCD (4 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Below Average - 50.00%
|
Posted: |
Feb 19, 2003 9:13:06 AM EDT
|
Bidding Closes: |
Feb 21, 2003 EDT
|
Viewed (by coders): |
192 times
|
Deadline: |
2/25/2003
TIME EXPIRED
|
|
|
|
Description:
Need an SQL Query for an ASP page using MS SQL Server 2000. There is a table called Precipitation_Data with the fields Date/Time, [Sensor ID], [Data Value], and [Data Type] The query must return the SUM of the [Data Value] for each "day" (day meaning from 8:00AM to 8:00AM) and then return the DATE of that SUM so for example there were 3 records on a Monday (ranging from 4pm to 10pm) that the [Data Value] totaled 4.5 and there were 10 records on Tuesday that the [Data Value] totaled 9 and on Tuesday there were 2 records that the [Data Value] totaled 1.3 I would get a record set that had DATE DD/MM/YYYY(This would be from 8:00AM That day to 8:00 the NEXT day) then the SUM value for that DATE. I.E 02/03/2003 4.5 (next record) 02/04/2003 9 (then next record) 02/05/2003 1.3 The variables that will change is the BETWEEN Dates. Here is an SQL stmt that I have been modifying but it will give you an idea of the varibles: sql="SELECT Min([Data Value]) as MIN, [Date/Time] FROM [Precipitation_Data] WHERE [Sensor ID] = '" & sensorid & "' and [Data Type] = 'S' GROUP BY [Date/Time] HAVING [Date/Time] BETWEEN'" & datestart & "'AND'" & dateend & "' ORDER BY [Date/Time]" The other SQL quries will be a variation of the one we need and will be SUMMING the Weeks, then Months, then Years
Deliverables: NEED DONE ASAP < one day!
PLEASE se the Attached Access database with the "live" data example. Please keep in mind that this has been EXPORTED from SQL Server and we are NOT using Access as the database.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
Platform:
SQL ASP
Must be 100% finished and received by buyer on:
Feb 25, 2003 EDT
Deadline legal notes: All times are expressed in the time zone of the site EDT (UT - 5). If the buyer omitted a time, then the deadline is 11:59:59 PM EDT on the indicated date.
Additional Files:
This bid request includes IMPORTANT additional attached files. Please download and read fully before bidding.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$25 (USD)
|
Feb 19, 2003 11:20:28 AM EDT
|
9.92
(Excellent)
|
|
|
Since your project is required to be completed ASAP, I paste my tested SQL directly without my bidding accepted by you.
SQL: SELECT Sum([Data Value]) as Data_Value, ( Right(('00' + Cast(Month(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Right(('00' + Cast(Day(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Cast(Year(DateAdd(hh,-8,[Date/Time])) as varchar(4) ) ) as Date_Time FROM [Precipitation_Data] WHERE [Sensor ID] = '123' and [Data Type] = 'S' and [Date/Time] > '02/03/2003 08:00:00' and [Date/Time] < '02/06/2003 08:01:00' GROUP BY ( Right(('00' + Cast(Month(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Right(('00' + Cast(Day(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Cast(Year(DateAdd(hh,-8,[Date/Time])) as varchar(4) ) ) ORDER BY ( Right(('00' + Cast(Month(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Right(('00' + Cast(Day(DateAdd(hh,-8,[Date/Time])) as varchar(2))),2) + '/' + Cast(Year(DateAdd(hh,-8,[Date/Time])) as varchar(4) ) )
My testing data: Date/Time Sensor ID Data Value Data Type 2003-2-4 8:21:00 123 1 S 2003-2-4 10:01:00 123 1 S 2003-2-4 11:01:00 123 1 S 2003-2-4 13:01:00 123 1 S 2003-2-4 14:01:00 123 1 S 2003-2-4 15:01:00 123 .5 S 2003-2-4 18:01:00 123 1 S 2003-2-5 7:59:00 123 1 S 2003-2-3 16:00:00 123 1 S 2003-2-3 18:00:00 123 1 S 2003-2-3 22:00:00 123 2.5 S 2003-2-4 8:01:00 123 1 S 2003-2-4 12:01:00 123 .5 S 2003-2-5 10:00:00 123 .6 S 2003-2-6 3:00:00 123 .7 S 2003-2-3 4:00:00 123 .8 S
And the result: 4.5 02/03/2003 9.0 02/04/2003 1.3 02/05/2003
If my bid price is higher than other's, please let me know. I can decrease it accordingly. Or I can develop the other sql statements for you for free.
|
|
|
|
|
|