Hi there!
It's been a while since I've used SQL so I'm probably making a simple mistake here:
I'm trying to write a query to a Retool database to display the SKU image, which is stored in a rental_skus table, in a list with the items in an order, which are stored in an orders_skus table.
select orders_skus.order_sku, orders_skus.order_id, orders_skus.status, rental_skus.sku, rental_skus.image_url
from orders_skus
left outer join rental_skus
on order_skus.order_sku = rental_skus.sku
where orders_skus.order_id = {{collectionView1.selectedItem.short_id}}
and orders_skus.status='unpicked';
I can select orders from the orders_skus table fine, including the conditions, but as soon as I add a join I get a 400 error. I've tried using other joins but with no luck?
Grateful for any help!
Danai