#define SELECT_TOTAL "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
"ifname, imsi, ground from statistics " \
- " where (time_stamp between ? and ?) and binpath != 'TOTAL_DATACALL' " \
- "and binpath != 'TOTAL_WIFI' and binpath != 'TOTAL_BLUETOOTH' " \
- "and binpath != 'TOTAL_IPV4' and binpath != 'TOTAL_IPV6' " \
+ "where (time_stamp between ? and ?) " \
+ "and binpath NOT LIKE 'TOTAL_%' " \
"group by iftype, ifname, imsi, hw_net_protocol_type, is_roaming " \
"order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
"is_roaming"
#define SELECT_TOTAL_IFACE "select iftype, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
"ifname, imsi, ground from statistics " \
- " where (time_stamp between ? and ?) " \
- "and iftype=? " \
+ "where (time_stamp between ? and ?) and iftype=? " \
+ "and binpath NOT LIKE 'TOTAL_%' " \
"group by hw_net_protocol_type, is_roaming, " \
"iftype, ifname, imsi " \
"order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
"is_roaming, sum(received) as received, sum(sent) as sent, " \
"ifname, imsi, ground, time_stamp - time_stamp % ? as time_stamp " \
"from statistics where time_stamp between ? and ? " \
+ "and binpath NOT LIKE 'TOTAL_%' " \
"group by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
"is_roaming " \
"order by time_stamp, iftype, ifname, imsi, hw_net_protocol_type, " \
"ifname, imsi, ground, time_stamp - time_stamp % ? as time_stamp " \
"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, imsi " \
"order by time_stamp, hw_net_protocol_type, is_roaming, iftype, " \
"ifname, imsi"