We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本3.0.5.1社区版本 win 在taos shell中一样的查询语句能查到对的平均值。 用C++连接taos,得到为0,但是其他普通查询可以得到正确数值,max()和min()也正确,只有avg()【聚合函数,测试sum()也为0,或者时很接近0的数】提取数值总是0。
关键代码: ` QString data = QString("SELECT avg(fyfkqxz_yc02) as fyfkqxz_yc02_avg FROM tsdb.ycmain WHERE TIMEDIFF(ts,NOW)<120000 and ts<=NOW");
TAOS_RES* result = taos_query(taosCon, data.toUtf8().data()); TAOS_ROW row = NULL; int num_fields = taos_field_count(result); TAOS_FIELD* fields = taos_fetch_fields(result); fprintf(stdout, "query successfully, got %d fields, the sql is: %s.\n", num_fields, data.toUtf8().data()); while ((row = taos_fetch_row(result))) { if (num_fields > 0) { auto colname = fields[0].name; QString colN = colname; float statdata = *(float*)(row[0]);//0 qDebug() << colN << statdata; } } taos_free_result(result);
`
taos shell中同样的语句查询正确
The text was updated successfully, but these errors were encountered:
3071 后没有windows版本也没有官方支持,所以windows版本没办法长期使用,建议先切换到linux版本 或者docker(当前最新版为 3.3.4.3 ) 再做后续调试。
Sorry, something went wrong.
No branches or pull requests
版本3.0.5.1社区版本 win
在taos shell中一样的查询语句能查到对的平均值。
用C++连接taos,得到为0,但是其他普通查询可以得到正确数值,max()和min()也正确,只有avg()【聚合函数,测试sum()也为0,或者时很接近0的数】提取数值总是0。
关键代码:
`
QString data = QString("SELECT avg(fyfkqxz_yc02) as fyfkqxz_yc02_avg FROM tsdb.ycmain WHERE TIMEDIFF(ts,NOW)<120000 and ts<=NOW");
`
taos shell中同样的语句查询正确
The text was updated successfully, but these errors were encountered: