{"id":50666,"date":"2017-07-25T00:00:00","date_gmt":"2017-07-25T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/"},"modified":"2025-11-14T07:53:33","modified_gmt":"2025-11-14T15:53:33","slug":"aggregation-with-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/","title":{"rendered":"GridDB\u306e\u96c6\u8a08\u95a2\u6570"},"content":{"rendered":"<h4>\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027<\/h4>\n<p>\u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u3088\u304f\u77e5\u3089\u308c\u3066\u3044\u308b\u4f8b\u3068\u3057\u3066\u306f\u3001\u6700\u5c0f\u5024\u3001\u5e73\u5747\u5024\u3001\u307e\u305f\u306f\u5408\u8a08\u5024\u306a\u3069\u306e\u7d71\u8a08\u5024\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u7d50\u679c\u306f\u3001\u30c7\u30fc\u30bf\u306e\u7d50\u8ad6\u3084\u63a8\u6e2c\u306b\u4f7f\u7528\u3055\u308c\u305f\u308a\u3001\u6642\u9593\u306e\u7d4c\u904e\u3068\u3068\u3082\u306b\u5909\u5316\u3059\u308b\u30c7\u30fc\u30bf\u306e\u30d1\u30bf\u30fc\u30f3\u3084\u50be\u5411\u3092\u89b3\u5bdf\u3059\u308b\u305f\u3081\u306b\u4f7f\u308f\u308c\u307e\u3059\u3002\u6a19\u6e96\u504f\u5dee\u3084\u5206\u6563\u306a\u3069\u306e\u4ed6\u306e\u96c6\u8a08\u7d50\u679c\u3092\u5229\u7528\u3057\u3066\u3001\u30c7\u30fc\u30bf\u30b5\u30f3\u30d7\u30eb\u306e\u4fe1\u983c\u6027\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u9ad8\u3044\u6a19\u6e96\u504f\u5dee\u307e\u305f\u306f\u5206\u6563\u304c\u898b\u3089\u308c\u305f\u5834\u5408\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u304a\u3044\u3066\u6e2c\u5b9a\u5024\u304c\u5e83\u304f\u62e1\u6563\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u3001\u3053\u306e\u6e2c\u5b9a\u5024\u306e\u4fe1\u983c\u6027\u304c\u4f4e\u3044\u3068\u63a8\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002GridDB\u306f\u3001\u958b\u767a\u8005\u304cAPI\u3092\u4f7f\u3063\u3066\u30c7\u30fc\u30bf\u3092\u96c6\u7d04\u3059\u308b\u305f\u3081\u306e\u3044\u304f\u3064\u304b\u306e\u65b9\u6cd5\u3068\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u304b\u3089\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h4> GridDB\u306b\u304a\u3051\u308b\u96c6\u8a08<\/h4>\n<p>GridDB\u306b\u306f\u3001\u96c6\u8a08\u30c7\u30fc\u30bf\u306e\u53ce\u96c6\u306b\u4f7f\u7528\u3067\u304d\u308b\u3055\u307e\u3056\u307e\u306a\u7d44\u307f\u8fbc\u307fAPI\u95a2\u6570\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002 GridDB\u306eJava API\u3067\u306f\u3001\u96c6\u8a08\u30e1\u30bd\u30c3\u30c9\u306f<code> AggregationResult <\/code>\u30bf\u30a4\u30d7\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u901a\u5e38\u3001\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u306e\u884c\u30bb\u30c3\u30c8\u3067\u306f\u306a\u304f\u3001\u5358\u4e00\u306e\u7d50\u679c\u306e\u5f62\u5f0f\u3068\u306a\u308a\u307e\u3059\u3002GridDB\u304c\u53ce\u96c6\u3067\u304d\u308b\u96c6\u8a08\u7d50\u679c\u306b\u306f\u3001\u6700\u5c0f\u5024\u3001\u6700\u5927\u5024\u3001\u5e73\u5747\u5024\u3001\u6a19\u6e96\u504f\u5dee\u3001\u884c\u6570\u3001\u3059\u3079\u3066\u306e\u884c\u306e\u5408\u8a08\u3001\u304a\u3088\u3073\u5206\u6563\u304c\u542b\u307e\u308c\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u7d50\u679c\u306f\u3001TimeSeries\u30b3\u30f3\u30c6\u30ca\u306e<code> .aggregate <\/code>\u30e1\u30bd\u30c3\u30c9\u307e\u305f\u306f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306eTQL\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4> TQL\u30af\u30a8\u30ea\u306b\u3088\u308b\u96c6\u8a08\u306e\u5b9f\u884c<\/h4>\n<p>TQL\u3068\u306f\u3001Terminology Query Language\u306e\u7565\u8a9e\u3067\u3059\u3002 GridDB\u306eSQL\u306e\u7c21\u7565\u5316\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u3001\u30b3\u30f3\u30c6\u30ca\u306b\u6a19\u6e96\u30af\u30a8\u30ea\u3068\u30c7\u30fc\u30bf\u64cd\u4f5c\u3092\u884c\u3046\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001TQL\u306f\u5b9f\u884c\u8a08\u753b\u3084\u30af\u30a8\u30ea\u6587\u306e\u89e3\u6790\u3092\u53d6\u5f97\u3059\u308b\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u6a19\u6e96\u6587\u5b57\u5217\u3092\u4f7f\u7528\u3057\u3066TQL\u3092\u8868\u73fe\u3057\u3001GridDB API\u304b\u3089<code> .query <\/code>\u307e\u305f\u306f<code> gsQuery <\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066TQL\u3092\u767a\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>TQL\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3068TimeSeries\u30b3\u30f3\u30c6\u30ca\u306e\u4e21\u65b9\u3067\u96c6\u8a08\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002 <code> .fetch\uff08\uff09<\/code> <code> gsFetch <\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u96c6\u8a08\u7d50\u679c\u3092\u53d6\u5f97\u3057\u3001\u524d\u8ff0\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u6570\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p><i> ClimateReading <\/i>\u3068\u3044\u3046Java\u30af\u30e9\u30b9\u306e\u5f62\u5f0f\u3067\u884c\u30b9\u30ad\u30fc\u30de\u3092\u6301\u3064Java\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u5909\u6570\u540d<code> climateContainer <\/code>\u304c\u3053\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306b\u30ad\u30e3\u30b9\u30c8\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c6\u30ca\u306e\u6a19\u6e96\u504f\u5dee\u3068\u300c\u6e29\u5ea6\u300d\u6b04\u306e\u5e73\u5747\u5024\u306e\u4e21\u65b9\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u307e\u305aTQL\u30af\u30a8\u30ea\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u4f5c\u6210\u3057\u3001GridDB API\u306e\u30af\u30a8\u30ea\u95a2\u6570\u3068\u30d5\u30a7\u30c3\u30c1\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u96c6\u8a08\u7d50\u679c\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<pre><span style=\"font-size: 10pt;\">Container&lt;String,ClimateReading&gt; climateContainer = store.getCollection(\"climate\",ClimateReading.class); \nString averageTql = \"SELECT AVG(temperature) FROM climate\";\nString standardDeviationTql&gt;= \"SELECT STDDEV(temperature) FROM climate\";\nQuery&lt;AggregationResult&gt; averageQuery = climateContainer.query(averageTql,AggregationResult.class);\nQuery&lt;AggregationResult&gt; standardDeviationQuery = climateContainer.query(standardDeviationTql, AggregationResult.class);\nRowSet&lt;AggregationResult&gt; rowSet = aggregationQuery.fetch();\/\/Set of one row which has the result\nRowSet&lt;AggregationResult&gt; stdDeviationSet = deviationQuery.fetch();\nAggregationResult average = rowSet.next();\nAggregationResult stdDev = stdDeviationSet.next();\nSystem.out.println(\"The average temperature is \" + average.getDouble());\nSystem.out.println(\"The standard deviation of the temperature is \" + stdDev.getDouble());\n<\/span><\/pre>\n<p>\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8:<\/p>\n<pre>The average temperature is 73.56\nThe standard deviation of the temperature is 4.62\n<\/pre>\n<h4>TimeSeries\u306b\u3088\u308b\u96c6\u8a08 Containers<\/h4>\n<p>Java\u3067TimeSeries\u30b3\u30f3\u30c6\u30ca\u306e\u96c6\u8a08\u7d50\u679c\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<code> .aggregate <\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u7167\u4f1a\u3059\u308b\u5217\u3068\u8a08\u7b97\u3059\u308b\u96c6\u8a08\u306e\u30bf\u30a4\u30d7\u3001\u304a\u3088\u3073\u958b\u59cb\u65e5\u3068\u7d42\u4e86\u65e5\u3068\u3057\u3066\u8a2d\u5b9a\u3059\u308b2\u3064\u306e\u65e5\u4ed8\u3092\u9078\u629e\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e4\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306f\u3001\u96c6\u8a08\u30af\u30a8\u30ea\u3092\u69cb\u6210\u3057\u307e\u3059\u3002\u3053\u306e\u30af\u30a8\u30ea\u304c<i>\u53d6\u5f97<\/i>\u3055\u308c\u308b\u3068\u3001<i> AggregationResult <\/i>\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002 AggregationResult\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u6570\u5024\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<code> .getDouble\uff08\uff09<\/code>\u307e\u305f\u306f<code> .getLong\uff08\uff09<\/code>\u306e\u3044\u305a\u308c\u304b\u306e\u547c\u3073\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>1\u3064\u4f8b\u3092\u6319\u3052\u3066\u3054\u8aac\u660e\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f\u3001TimeSeries\u30b3\u30f3\u30c6\u30ca\u304c\u5909\u6570<code> timeSeries <\/code>\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5e73\u5747\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044 &#8220;light&#8221;\u3068\u3044\u3046\u6570\u5024\u5217\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u8a08\u7b97\u306b\u542b\u307e\u308c\u308b\u884c\u3092\u3001\u8a2d\u5b9a\u3055\u308c\u305f\u958b\u59cb\u65e5\u3068\u7d42\u4e86\u65e5\u306e\u9593\u306b\u5236\u9650\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30af\u30a8\u30ea\u306e\u958b\u59cb\u65e5\u307e\u305f\u306f\u7d42\u4e86\u65e5\u3092\u8a2d\u5b9a\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f\u3001\u30af\u30a8\u30ea\u306e\u6700\u521d\u307e\u305f\u306f2\u756a\u76ee\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092<code> null <\/code>\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u65e5\u4ed8\u306f\u3001\u5909\u6570<code> start <\/code>\u304a\u3088\u3073<code> end <\/code>\u306b\u305d\u308c\u305e\u308c<i> Date <\/i>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u3066\u30ad\u30e3\u30b9\u30c8\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre><span style=\"font-size: 10pt;\">\/\/ Get average from earliest record to latest record in the container on the \u2018light\u2019 column\nAggregationResult averageResult = timeSeries.aggregate(start,end,\u201dlight\u201d,Aggregation.AVERAGE);\nSystem.out.println(\"The average light value is \" + averageResult.getDouble());<\/span> \n<\/pre>\n<p>\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\uff1a<\/p>\n<pre>The average light value is 29.82\n<\/pre>\n<h4>\u6642\u9593\u52a0\u91cd\u5e73\u5747<\/h4>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u5217\u306e\u5e73\u5747\u3092\u53d6\u5f97\u3059\u308b\u3068\u304d\u3001\u79c1\u305f\u3061\u304c\u8003\u3048\u3066\u3044\u308b\u901a\u5e38\u306e\u5e73\u5747\u5024\uff08\u3059\u3079\u3066\u306e\u5024\u3092\u5024\u306e\u6570\u3067\u5272\u3063\u305f\u3082\u306e\u306e\u5408\u8a08\uff09\u3067\u5341\u5206\u3067\u306f\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u6642\u9593\u95a2\u9023\u30c7\u30fc\u30bf\u306b\u9069\u3057\u305f\u96c6\u8a08\u7d50\u679c\u306f\u6642\u9593\u5e73\u5747\u3067\u3059\u3002 \u6642\u9593\u52a0\u91cd\u5e73\u5747\u306f\u3001\u6e2c\u5b9a\u5024\u306e\u3059\u3079\u3066\u306e\u5024\u3060\u3051\u3067\u306a\u304f\u3001\u305d\u308c\u3089\u306e\u9593\u306e\u6642\u9593\u91cf\u3082\u8003\u616e\u306b\u5165\u308c\u307e\u3059\u3002<\/p>\n<p>1\u3064\u306e\u4f8b\u3092\u6319\u3052\u308b\u3068\u3001\u975e\u5b9a\u671f\u7684\u306a\u6642\u9593\u9593\u9694\u3067\u6e2c\u5b9a\u5024\u3092\u8a18\u9332\u3059\u308b\u30bb\u30f3\u30b5\u30fc\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002 \u3053\u306e\u30bb\u30f3\u30b5\u30fc\u3067\u306f\u6700\u521d\u306f\u9332\u97f3\u306e\u9593\u9694\u304c3\u79d2\u3067\u3057\u305f\u304c\u3001\u6570\u6642\u9593\u5f8c\u306b\u306f\u3053\u306e\u9332\u97f3\u306e\u9593\u9694\u304c6\u79d2\u4ee5\u4e0a\u306b\u5897\u52a0\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u4e0d\u4e00\u81f4\u3092\u8aac\u660e\u3059\u308b\u306b\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u3059\u3079\u3066\u306e\u30a8\u30f3\u30c8\u30ea\u306e\u6642\u9593\u5024\u3068\u96a3\u63a5\u3059\u308b\u884c\u9593\u306e\u6642\u9593\u9593\u9694\u306b\u3088\u3063\u3066\u5e73\u5747\u81ea\u4f53\u3092\u91cd\u307f\u4ed8\u3051\u3059\u308b\u3068\u3044\u3046\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 GridDB\u306f\u3001\u305d\u306e\u3088\u3046\u306aTimeSeries\u30b3\u30f3\u30c6\u30ca\u306e\u6642\u9593\u52a0\u91cd\u5e73\u5747\u3092\u5f97\u308b\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h4>\u6642\u9593\u52a0\u91cd\u5e73\u5747\u306e\u8a08\u7b97<\/h4>\n<p>\u6642\u9593\u5e73\u5747\u306f\u3001<code> TimeSeries <\/code>\u30b3\u30f3\u30c6\u30ca\u306b\u56fa\u6709\u306e\u96c6\u7d04\u5024\u3067\u3059\u3002 \u3053\u308c\u3089\u306e\u7d50\u679c\u306f\u3001<code> TIME_AVG <\/code> TQL\u30af\u30a8\u30ea\u307e\u305f\u306f<code> WEIGHTED_AVERAGE <\/code>\u96c6\u8a08\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002 GridDB\u306e\u52a0\u91cd\u5e73\u5747\u306f\u3001\u884c\u306e\u3059\u3079\u3066\u306e\u5024\u306b\u3001\u305d\u308c\u306b\u96a3\u63a5\u3059\u308b2\u3064\u306e\u884c\uff08\u524d\u5f8c\u306e\u884c\uff09\u306e\u6642\u9593\u9593\u9694\u306e\u534a\u5206\u306e\u52a0\u91cd\u5024\u3092\u4e0e\u3048\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u8a08\u7b97\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<i> light <\/i>\u3068\u3044\u3046\u5217\u306e\u52a0\u91cd\u5e73\u5747\u3092TimeSeries\u30b3\u30f3\u30c6\u30ca\u3067\u53ce\u96c6\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002 \u3042\u308b\u884c\u3067\u3001<i>\u884c10 <\/i>\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u306f6\u670822\u65e58:23:43\u3067\u3001\u30e9\u30a4\u30c8\u5024\u306f23\u3067\u3059\u3002\u524d\u306e\u884c\u306f4\u79d2\u524d\u306b\u633f\u5165\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u884c10\u306e10\u79d2\u5f8c\u306b\u6b21\u306e\u884c\u304c\u633f\u5165\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u884c10\u306e\u52a0\u91cd\u5024\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<pre>(10 + 4 ) \/ 2 = 7 \n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u6642\u9593\u306b\u633f\u5165\u3055\u308c\u305f5\u884c\u306e\u30b3\u30f3\u30c6\u30ca\u3067\u306f\u3001<\/p>\n<pre>Row     Time     Value                    Weighted-Value\n0          0        20                                10\n1         10        30             (10 + 15 ) \/ 2 = 12.5\n2         25        50                 (15 + 5) \/ 2 = 10\n3         30        70               (5 + 30) \/ 2 = 17.5\n4         60        60                                30\n<\/pre>\n<p>\u52a0\u91cd\u5e73\u5747\u306f\u3001\u3059\u3079\u3066\u306e\u5024\u3092\u3059\u3079\u3066\u306e\u52a0\u91cd\u5024\u306e\u5408\u8a08\u3067\u5272\u3063\u305f\u5408\u8a08\u3067\u3059\u3002<\/p>\n<pre><span style=\"font-size: 10pt;\">Sum of Values:\t\t20 + 30 + 50 + 70  + 60 = 230   \nSum of Weights: \t10 + 12.5 + 17.5 + 10   =  50   \nSum of Values \/ Sum of Weights:         230\/50  = 4.6\n<\/span><\/pre>\n<p>\u52a0\u91cd\u5e73\u5747\u306f4.6\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u4ee5\u4e0a\u3067\u3059\u3002\u304a\u5206\u304b\u308a\u306b\u306a\u308a\u307e\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f<br \/>\nGridDB\u306e\u96c6\u8a08\u64cd\u4f5c\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/griddb.net\/newja\/docs\/GridDB_API_Reference.html#sec-3.3.2\" target=\"_ blank\" rel=\"noopener noreferrer\">\u3053\u3061\u3089<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002 GridDB API\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001<a href=\"https:\/\/griddb.net\/newja\/docs\/GridDB_API_Reference.html\" target=\"_blank\" rel=\"noopener noreferrer\"> GridDB API\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u30da\u30fc\u30b8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 \u3088\u304f\u77e5\u3089\u308c\u3066\u3044\u308b\u4f8b\u3068\u3057\u3066\u306f\u3001\u6700\u5c0f\u5024\u3001\u5e73\u5747\u5024\u3001\u307e\u305f\u306f\u5408\u8a08\u5024\u306a\u3069\u306e\u7d71\u8a08\u5024\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u7d50\u679c\u306f\u3001\u30c7\u30fc\u30bf\u306e\u7d50\u8ad6\u3084\u63a8\u6e2c [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":49013,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/aggregation-with-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/aggregation-with-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-25T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:53:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2017\/07\/blog_title_14.png\" \/>\n\t<meta property=\"og:image:width\" content=\"870\" \/>\n\t<meta property=\"og:image:height\" content=\"490\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Joshua Pascascio\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Joshua Pascascio\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/\"},\"author\":{\"name\":\"Joshua Pascascio\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\"},\"headline\":\"GridDB\u306e\u96c6\u8a08\u95a2\u6570\",\"datePublished\":\"2017-07-25T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:53:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/\"},\"wordCount\":53,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2017\/07\/blog_title_14.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/\",\"name\":\"GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2017\/07\/blog_title_14.png\",\"datePublished\":\"2017-07-25T07:00:00+00:00\",\"dateModified\":\"2025-11-14T15:53:33+00:00\",\"description\":\"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2017\/07\/blog_title_14.png\",\"contentUrl\":\"\/wp-content\/uploads\/2017\/07\/blog_title_14.png\",\"width\":870,\"height\":490},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8\",\"name\":\"Joshua Pascascio\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g\",\"caption\":\"Joshua Pascascio\"},\"url\":\"https:\/\/griddb.net\/ja\/author\/joshua\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT","description":"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/aggregation-with-griddb\/","og_locale":"ja_JP","og_type":"article","og_title":"GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT","og_description":"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/aggregation-with-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2017-07-25T07:00:00+00:00","article_modified_time":"2025-11-14T15:53:33+00:00","og_image":[{"width":870,"height":490,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2017\/07\/blog_title_14.png","type":"image\/png"}],"author":"Joshua Pascascio","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"Joshua Pascascio","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/"},"author":{"name":"Joshua Pascascio","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8"},"headline":"GridDB\u306e\u96c6\u8a08\u95a2\u6570","datePublished":"2017-07-25T07:00:00+00:00","dateModified":"2025-11-14T15:53:33+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/"},"wordCount":53,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2017\/07\/blog_title_14.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/","name":"GridDB\u306e\u96c6\u8a08\u95a2\u6570 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2017\/07\/blog_title_14.png","datePublished":"2017-07-25T07:00:00+00:00","dateModified":"2025-11-14T15:53:33+00:00","description":"\u96c6\u8a08\u5024\u3068\u305d\u306e\u91cd\u8981\u6027 \u96c6\u8a08\uff08Aggregation)\u3068\u306f\u3001\u7279\u5b9a\u306e\u57fa\u6e96\u306b\u57fa\u3065\u3044\u3066\u30c7\u30fc\u30bf\u3092\u8981\u7d04\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/aggregation-with-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2017\/07\/blog_title_14.png","contentUrl":"\/wp-content\/uploads\/2017\/07\/blog_title_14.png","width":870,"height":490},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/ca72185e9a3778df765a76313f789fd8","name":"Joshua Pascascio","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/872ef8be79cb5117c256feb4c279ac41b954bfba599d647db925185c449aff1c?s=96&d=mm&r=g","caption":"Joshua Pascascio"},"url":"https:\/\/griddb.net\/ja\/author\/joshua\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50666"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50666\/revisions"}],"predecessor-version":[{"id":51509,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50666\/revisions\/51509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/49013"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}