2024-10-04 03:22:58 发布
网友
我似乎无法将以下查询转换为SQLAlchemy。在
我想翻译以下问题:
SELECT date_trunc('day', time), "PositionReport".callsign FROM tvh_aircraft."PositionReport" WHERE "PositionReport".reg = 'PH-BVA' GROUP BY 1, "PositionReport".callsign
我试过以下几种方法,但没有成功。在
提前谢谢你的帮助。在
session.query(func.date_trunc('day', PositionReport.time), PositionReport.callsign) \ .filter(PositionReport.reg=='PH-BVA') \ .group_by(func.date_trunc('day', PositionReport.time), PositionReport.callsign).all()
或者如果您需要GROUP BY 1
GROUP BY 1
或者如果您需要
^{pr2}$GROUP BY 1
相关问题 更多 >
编程相关推荐