Hello peeps, i have a few questions regarding this code in SQL, so i want to do something else to it, i want to make it so that it only displays the ‘active’ users without changing the filter before the cross join, What exactly should i put so that this query makes it so it does everything else but shows only the ‘active’ users, should i use a where ‘column name’ or like ‘%Active%’ ? i tried to do this but it didn’t display any results so i’m assuming there’s something wrong with that, i guess i need to do something regarding the ‘WITH’ operator? to include the previous query? but i can’t seem to figure it out and i want to experiment a little bit more regarding that since it’s such a good opportunity.
Sorry i tried looking in the forums but seems i’m the only one that has this inquiry haha
Thanks if anyone knows any pointer regarding what i want to do, hope i didn’t confuse anyone.
premium_users.purchase_date <= months.months)
and (premium_users.cancel_date >= months.months
or premium_users.cancel_date is null)
end as ‘status’
CROSS JOIN months
- here after the cross join i want to input something that let’s me display only ‘active’ users *