It's pretty hard to see what's going on here for several reasons:1. You didn't post CREATE TABLE statements for the tables involved2. You didn't post INSERT INTO statements to populate the tables with test data3. You didn't post the results you are getting4. You didn't post the results you want.5. The query you posted is very difficult to read as is. I pasted a reformatted query belowReformatted query:SELECT nonregister.email AS firstname ,nonregister.email ,appliedjobstatuswithresumes.description ,appliedjobstatuswithresumes.applieddateFROM nonregister ,appliedjobstatuswithresumesWHERE appliedjobstatuswithresumes.nonregid IN ( SELECT nonregid FROM nonregister WHERE nonregid IN ( SELECT nonregid FROM [appliedjobstatuswithresumes] WHERE [jobid] = '100' AND [stageorderid] IN ( SELECT [stageorderid] FROM [jobstages] WHERE [stageid] = '1' AND [jobid] = '100' ) ) ) AND nonregister.nonregid IN ( SELECT nonregid FROM nonregister WHERE nonregid IN ( SELECT nonregid FROM [appliedjobstatuswithresumes] WHERE [jobid] = '100' AND [stageorderid] IN ( SELECT [stageorderid] FROM [jobstages] WHERE [stageid] = '1' AND [jobid] = '100' ) ) )GROUP BY nonregister.email ,nonregister.email ,appliedjobstatuswithresumes.description ,appliedjobstatuswithresumes.applieddate
Here is an attempt at simplification. I've had to make some assumptions and cannot test this since I do not have the table defs or data:SELECT nonregister.email AS firstname ,nonregister.email ,appliedjobstatuswithresumes.description ,appliedjobstatuswithresumes.applieddateFROM nonregister nrjoin appliedjobstatuswithresumes ajr on nr.nonregid = ajr.nonregidjoin jobstages js on js.stageorderid = ajr.stageorderidwhere js.stageid = '1' and js.jobid = '100'GROUP BY nr.email ,ajr.description ,ajr.applieddate
Perhaps use this as a starting point and let's see where that get's us. But it you're still stuck, please post the missing items I listed above.