The error already tells the origin, which is em 'where clause'
. The alias, does not change anything in this case, since the WHERE
remains as id = 3
. You did right in the select
and wrong in the where
.
The solution, even without alias, would be to use:
select deals.id from funnels
inner join deals on
deals.funnel_id = funnels.id where deals.id = 3
Of course, since it’s ambiguous, I’m assuming you’re referring to deals.id = 3
, if it’s not that, it’ll be funnels.id = 3
. Anyway, the problem is in WHERE
, as the error points out, so just do the same as you did in the select
, specify which table want to use (tabela.id
).
Without you showing the structures of the tables Deals and funnels we could only speculate and not answer clearly. Maybe it is this end ...Where id = 3.
– anonimo