I have database table, having business_name and user_id with created_at and updated_at, now i want to query data where i will get only thoes user_ids with only business having created_at greater than specific date.
Business::where('created_at', '>' , new \DateTime('2020-08-30'))->distinct('user_id')->get();
now this query return records with created_at greate than this date, but i want user_id who have created business only after this and have no other record before this date.