1
SQLAlchemy의 작동 방식은 여전히 혼란 스럽습니다. 현재이 쿼리는 다음과 같습니다.Flask-SQLAlchemy에서 카운트 선택
SELECT cast(a.product_id as bigint) id, cast(count(a.product_id) as bigint) itemsSold, cast(b.product_name as character varying)
from transaction_details a
left join product b
on a.product_id = b.product_id
group by a.product_id, b.product_name
order by itemsSold desc;
Flask tho에서 어떻게 변환되는지 잘 모르겠습니다.
최고 : 고맙습니다. –