I have a table with date format YYYY-MM-DD and fields are:
user | assign_date | removal_date A | 2020-01-01 | null B | 2020-01-01 | 2020-01-05 C | 2020-01-10 | null
How using Laravel Query Builder or simple SQL query I can get users to compare assign_date and removal date with selected_date? The example of the needed results.
selected date | users 2020-01-03 | A,B (user C has not recruited yet) 2020-01-06 | A (user C has not recruited yet and user B has already been fired) 2020-01-11 | A,C (user C has already recruited, but user B has already been fired)