|
(
|
SELECT 0,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88234 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 1,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88235 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 2,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88236 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 3,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88239 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 4,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88240 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 5,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 88242 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 6,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 490360 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 7,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 490361 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 8,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 1971427 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`) UNION ALL(
|
SELECT 9,`SiteID`,`PointID`,`datevalue`,`timevalue`,`NumericValue`
|
FROM `trendrecord`.`tr_00043`
|
WHERE `PointID` = 1971428 AND `datevalue` = '2018-06-04' AND `timevalue` >= '02:36:08' AND ((`SiteID` = 43) AND (`datevalue` = DATE'2018-06-04') AND (`PointID` IN(88236, 88240, 490361, 88234, 88235, 88239, 490360, 88242, 1971427, 1971428)) AND (`timevalue` >= '02:36:08'))
|
GROUP BY `PointID`,((UNIX_TIMESTAMP((add_time(`datevalue`, `timevalue`)))) DIV 30)
|
ORDER BY `timevalue`,`SiteID`)
|
ORDER BY `timevalue`,`SiteID`
|