sow-aggregated
Including the basic AMPS library:
#include <amps/ampsplusplus.hpp>
Constructing the command:
AMPS::Command cmd(AMPS::Message::Command::SOW);
AMPS::Message::Options opts;
opts.setProjection("/id as /id, COUNT(/values) as /valueCount");
opts.setGrouping("/id");
// Set other options as needed
cmd.setTopic(topic).setOptions(opts);
The command can now be used in execute or executeAsync.