Postgresql – Rails/SQL – How to find users who does not have premium subscription with joins
I have two models User and Subscription as follows class User < ApplicationRecord has_many :subscriptions end class Subscription < ApplicationRecord belongs_to :user # attributes # name string # premium boolean # ... end Users will be having many subscription. How…