i have a sql query like this:
select something
from
(
inner query here - outputs is correct: eg 2000 datasets
) as a
left outer join tableA
on tableA.id=innerQuery.id
where someYear = -----------> had to change this "and" to "where"
(
select max(tableYear)
from tableC
where
etc....
)
eg years:
2011, 1999, 1901 max is 2011.
1978, 1981,1990 max is 1990.
etc.. the problem i am having is, with the "where" statement, i am only getting fewer 1600 datasets; however if i were to key in a value and use "and", outputs comes out correct 2000. is there a way to use "where" with a left outer join and get all my outputs?