Aha! Got it.
Thank you very much!
Best
On Tue, 7 Apr 2020, 21:17 Jeremy Evans, wrote:
> On Tuesday, April 7, 2020 at 11:11:59 AM UTC-7, Marcelo wrote:
>>
>> Hello,
>>
>> I'm trying to produce this query with Sequel, that would then run on
>> PostgreSQL:
>> SELECT o.id, coalesce(cg.price,
On Tuesday, April 7, 2020 at 11:11:59 AM UTC-7, Marcelo wrote:
>
> Hello,
>
> I'm trying to produce this query with Sequel, that would then run on
> PostgreSQL:
> SELECT o.id, coalesce(cg.price, o.price) price
> FROM offers o
> LEFT JOIN country_groups cg ON cg.offer_id = o.id AND
Hello,
I'm trying to produce this query with Sequel, that would then run on
PostgreSQL:
SELECT o.id, coalesce(cg.price, o.price) price
FROM offers o
LEFT JOIN country_groups cg ON cg.offer_id = o.id AND cg.country_codes @>
'{"US"}'
I understand I can use an array of conditions, as follows: