I want to make such a query for my Services ActiveRecord in Rails:
SELECT *
FROM "services" AS s
WHERE /* part using 's' alias */
Normally I'd write just Service.where(/* where part */), but I need to set my alias.
I tried to run ActiveRecord::Base.connection.execute(query), but result of that is not recognized as Service.
How can I handle it?