Modify database query appropriately 38/235238/1 accepted/tizen/5.5/unified/20200604.152641 submit/tizen_5.5/20200603.040253
authorhyunuk.tak <hyunuk.tak@samsung.com>
Mon, 18 May 2020 07:57:23 +0000 (16:57 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Wed, 3 Jun 2020 03:56:58 +0000 (12:56 +0900)
Change-Id: I71690be6c07a3133941835adab11dac80b243d2b
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
src/database/tables/table-statistics.c

index 7d13a3f..ef1f1f0 100755 (executable)
 
 #define SELECT_CHUNKS_APP "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
-       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
        "from statistics " \
-       "group by iftype, ifname, time_stamp, hw_net_protocol_type, is_roaming  " \
-       "order by time_stamp, iftype, ifname, hw_net_protocol_type, is_roaming"
+       "group by iftype, ifname, timestamp, hw_net_protocol_type, is_roaming  " \
+       "order by timestamp, iftype, ifname, hw_net_protocol_type, is_roaming"
 
 #define SELECT_CHUNKS_APP_IFACE "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
-       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
        "from statistics where time_stamp between ? and ? and binpath = ? " \
        "and iftype = ? " \
-       "group by time_stamp, hw_net_protocol_type, is_roaming, " \
+       "group by timestamp, hw_net_protocol_type, is_roaming, " \
        "iftype, ifname, subscriber_id " \
-       "order by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+       "order by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
        "is_roaming"
 
 #define SELECT_TOTAL "select iftype, hw_net_protocol_type, " \
 
 #define SELECT_CHUNKS_TOTAL "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
-       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
        "from statistics where time_stamp between ? and ? " \
        "and binpath NOT LIKE 'TOTAL_%' " \
-       "group by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+       "group by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
        "is_roaming " \
-       "order by time_stamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
+       "order by timestamp, iftype, ifname, subscriber_id, hw_net_protocol_type, " \
        "is_roaming"
 
 #define SELECT_CHUNKS_TOTAL_IFACE "select iftype, hw_net_protocol_type, " \
        "is_roaming, sum(received) as received, sum(sent) as sent, " \
-       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as time_stamp " \
+       "ifname, subscriber_id, ground, time_stamp - time_stamp % ? as timestamp " \
        "from statistics where time_stamp between ? and ? " \
        "and iftype = ? " \
        "and binpath NOT LIKE 'TOTAL_%' " \
-       "group by time_stamp, hw_net_protocol_type, is_roaming, iftype, ifname, subscriber_id " \
-       "order by time_stamp, hw_net_protocol_type, is_roaming, iftype, " \
+       "group by timestamp, hw_net_protocol_type, is_roaming, iftype, ifname, subscriber_id " \
+       "order by timestamp, hw_net_protocol_type, is_roaming, iftype, " \
        "ifname, subscriber_id"
 
 /* INSERT statement */