sql

Sql code posted by foo
created at 14 May 12:47, updated at 20 May 01:50

Edit | Back
1
2
3
4
5
6
7
8
9
SELECT wpdat.workpoolid,
     max(wpdat.open) AS open_high,
     min(wpdat.open) AS open_low,
     max(wpdat.resubmissions) AS resubmissions_high,
     min(wpdat.resubmissions) AS resubmissions_low
FROM workpool AS wpdat
WHERE wpdat.`timestamp` >= (unix_timestamp()
              - 60 * 60 * 24 * 7+60*60)
GROUP BY wpdat.workpoolid
328 Bytes in 2 ms with coderay