|
8 | 8 | $query = 'SELECT SQL_CALC_FOUND_ROWS ';
|
9 | 9 | $query .= ' review.checksum AS checksum,';
|
10 | 10 | $query .= ' review.fingerprint AS fingerprint,';
|
11 |
| - $query .= ' DATE(review.first_seen) AS first_seen,'; |
12 |
| - $query .= ' DATE(review.last_seen) AS last_seen,'; |
13 | 11 | $query .= " IFNULL(review.reviewed_by, '') AS reviewed_by,";
|
14 | 12 | $query .= ' DATE(review.reviewed_on) AS reviewed_on,';
|
15 | 13 | $query .= ' review.comments AS comments,';
|
16 | 14 | if (strlen($reviewhost['history_table'])) {
|
| 15 | + $query .= ' DATE(MIN(history.ts_min)) AS first_seen,'; |
| 16 | + $query .= ' DATE(MAX(history.ts_max)) AS last_seen,'; |
17 | 17 | $query .= ' SUM(history.ts_cnt) AS `count`,';
|
18 | 18 | $query .= ' ROUND(SUM(history.query_time_sum), 2)*1000 AS `time`,';
|
19 | 19 | $query .= ' ROUND(SUM(history.query_time_sum)*1000/SUM(history.ts_cnt), 2) AS time_avg';
|
|
22 | 22 | $query .= ' ON history.checksum = review.checksum';
|
23 | 23 | }
|
24 | 24 | else {
|
| 25 | + $query .= ' DATE(review.first_seen) AS first_seen,'; |
| 26 | + $query .= ' DATE(review.last_seen) AS last_seen,'; |
25 | 27 | $query .= ' 0 AS `count`,';
|
26 | 28 | $query .= ' 0 AS `time`,';
|
27 | 29 | $query .= ' 0 AS time_avg';
|
|
0 commit comments