First, create the named tuple from list of cosi::field instances. First parameter is name in resulting JSON, second is optional field name in SQL query. If not used, the same name is used for both JSON and SQL.
auto t = cosi::make(
cosi::string_f {"data"},
cosi::int_f {"integerData", "COUNT(data)"},
cosi::double_f {"moreData", "another_table.data"}
);