[英]How two join multiple tables with multiple conditions in sqlalchemy
select d.field_value as name,a.mobile,c.balance,a.created_at from users as a inner join user_profiles as b on a.id = b.user_id
inner join wallets as c on c.user_profile_id = b.id
left join profile_details as d on d.user_id = a.id where d.field_name = "name" and c.balance > 0 order by a.id desc;
這是我的查詢,我需要寫入 sqlalchemy,我有 model,其中包含所有提到的表和適當的列。 感謝您在這里花費的所有努力和時間。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.