0

一个。CreditCard belongs_to_ User一个Subscriptionbelong_to User

我正在尝试查询所有CreditCardsbelong_toUser哪里Subscription.status"authorized"

select * from credit_cards
join users on users.id = credit_cards.user_id
join subscriptions on users.id = subscriptions.user_id
where subscriptions.status = "authorized"

返回ERROR: column "authorized" does not exist

where Subscription.status = "authorized"给我missing FROM-clause entry for table "subscription"

我究竟做错了什么?

4

0 回答 0