Skip to main content

How to write this raw SQL query in Active Record Query Interface

Rails • Asked by W.M.

Here's the SQL:

select,, count( as count from items i
left join products p
on = i.product_id
left join stores s
on = i.store_id
group by,

Thank you.

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.