I have this table A which contains
| ID | Start Date | End Date |
|:---- |:----------:| --------:|
| 1 | 2020-03-01 |2020-03-02|
| | 2020-05-01|2020-05-02|
| 2 | 2020-06-01|2020-06-02|
And table B contains
| ID | Date | sales |
|:---- |:--------:| -----:|
| 1 |2019-03-01| 10 |
| 1 |2021-03-02| 10 |
| 1 |2020-03-01| 10 |
| 1 |2020-03-02| 10 |
| 1 |2020-05-01| 10 |
| 1 |2020-05-02| 10 |
| 2 |2019-03-01| 10 |
| 2 |2021-03-02| 10 |
| 2 |2020-06-01| 10 |
| 2 |2020-03-02| 10 |
| 2 |2020-05-01| 10 |
| 2 |2020-06-02| 10 |
| 3 |2019-03-01| 10 |
| 3 |2021-03-02| 10 |
| 3 |2020-05-01| 10 |
| 3 |2020-05-02| 10 |
I want to exclude the results in Table B from Table A, if the ID in Table A is null then I will have to exclude the dates from all the results/IDs in Table B. So the final table will be
| ID | Date | sales |
|:---- |:--------:| -----:|
| 1 |2019-03-01| 10 |
| 1 |2021-03-02| 10 |
| 2 |2019-03-01| 10 |
| 2 |2021-03-02| 10 |
| 2 |2020-03-02| 10 |
| 3 |2019-03-01| 10 |
| 3 |2021-03-02| 10 |
I really appreciate any help you can provide.