Κλειστό

average calculation in SQL

Dear Coders, I need a SELECT-command for the calculation of average data in a MySQL-database. I've got a MySQL database with normalized structure: timestamp (timestamp); sensor (int); value (dec) Name of the table: "dataset" "timestamp" is MySQL-timestamp, not UNIX-timestamp "value" and "sensor" can be NULL Unique Index is on fields: "timestamp" and "sensor" The data is 10-minute-average data from a weather station. Please have a look at the attached Excel-file! The first sheet "database-entries" contains dumped data from the SQL database. That's "real data", which you need to work with. Sometimes, a sensor has a failure - then its value is NULL. I've marked this with yellow color in the example. On the second sheet "average (30 minutes)" you can see the resulting table, I want to get. timestamp (timestamp); sensor (int); value (double); errors (int) "timestamp" is MySQL-timestamp "value" is the average data for the sensor "errors" is the count of NULL value in a sensor (see Excel-file) It should be possible to calculate various average data: - for 30 minutes - for 60 minutes - for 24 hours A small example for calculating 30-minute-average: 2008-05-05 07:00;0;32 2008-05-05 07:10;0;12 2008-05-05 07:20;0;15 2008-05-05 07:30;0;95 "2008-05-05 07:00" is NOT used for this calculation, since it's 10-minute-average data already! 07:00 contains the measurements from 06:51 to 07:00. result should be: 2008-05-05 07:30;0;40,66666667 (12 + 15 + 95) / 3 = 40,66666667 Please read the Excel-file correctly, please ask if you've got questions. Would be happy for a nice and easy solution with good support. Best regards, Lars-Daniel

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

any

Δεξιότητες: Διαχείριση Βάσεων Δεδομένων, Microsoft Access, MySQL, SQL

Δείτε περισσότερα: weather coder, index data structure, hire station, count command in excel, sql microsoft access, microsoft access sql, structure sensor, sql support, sql microsoft, i need a sql coder, excel with sql server, excel calculation, sql server 2008 access, excel access table, web sql database support, sql server access excel, form look good access, excel count condition, example weather desktop, sql select select, excel timestamp, sql select, read file average, access form look good, access sql calculate

Σχετικά με τον Εργοδότη:
( 11 αξιολογήσεις ) Dortmund, Germany

ID Εργασίας: #3929928

11 freelancers κάνουν προσφορές με μέσο όρο $14 γι' αυτή τη δουλειά

Andreena

See private message.

$12.75 USD σε 2 μέρες
(242 Αξιολογήσεις)
5.8
redsox570

See private message.

$17 USD σε 2 μέρες
(39 Αξιολογήσεις)
5.3
azrajobs

See private message.

$17 USD σε 2 μέρες
(42 Αξιολογήσεις)
4.8
spx2vw

See private message.

$17 USD σε 2 μέρες
(32 Αξιολογήσεις)
4.7
lemoinek

See private message.

$12.75 USD σε 2 μέρες
(7 Αξιολογήσεις)
3.5
ilikecoding

See private message.

$17 USD σε 2 μέρες
(25 Αξιολογήσεις)
3.4
jzevakin

See private message.

$8.5 USD σε 2 μέρες
(7 Αξιολογήσεις)
3.0
diegodevita

See private message.

$4.25 USD σε 2 μέρες
(6 Αξιολογήσεις)
2.5
sobah

See private message.

$12.75 USD σε 2 μέρες
(0 Αξιολογήσεις)
0.0
rsrindia

See private message.

$12.75 USD σε 2 μέρες
(1 Αξιολόγηση)
1.9
WasiqulIslam

See private message.

$17 USD σε 2 μέρες
(0 Αξιολογήσεις)
0.0