query << "SELECT DISTINCT \"internalIP\", COUNT(DISTINCT \"externalIP\"), "
<< "SUM(\"numBytes\"), SUM(\"content\") FROM \""
<< NON_DNS_TRAFFIC_SCHEMA_NAME << "\".\"" << date
<< "\" GROUP BY \"internalIP\"";
result = PQexecParams(postgreSQL, query.str().c_str(), 0, NULL, NULL, NULL, NULL, 1);
What does this query means? Also Any idea about function PQexecParams()?
You can find documentation on PQexecParams at the Postgres website.
The query will get the number of distinct
externalIPs, the sum ofnumbytes, and the sum ofcontentfor each of the values ofinternalIP.