use of MOD(patient.id, 2) = 1 . if you need to find odd id's instead of say using in (1,3,5,7,....) use Mod

PHOTO EMBED

Wed Mar 22 2023 03:07:53 GMT+0000 (Coordinated Universal Time)

Saved by @vnmshenoy

​SELECT tr.name,pat.first_name,pat.last_name
from therapy th
join treatment tr on th.treatment_type=tr.type
join patient pat on th.patient_id=pat.id
join physician ph on th.physician_id=ph.id
where ph.last_name in ('Core','Calderwood')
and mod(pat.id,2)=1
content_copyCOPY

https://learnsql.com/track/sql-practice/course/joins/non-equi/exercises/exercise-1