Measurable Functions with Common Sigma Sub-Algebras Let $X:\mathbb{R}\rightarrow\mathbb{R}$ be a non-constant function, measurable with respect to the Borel-Algebra $\mathcal{B}$ and $\sigma(X)$ the sigma-algebra generated by $X$. Let $\mathcal{A}\subsetneqq\sigma(X)$, $\mathcal{A}\neq\{\emptyset, \mathbb{R}\}$ be a sub-sigma algebra of $\sigma(X)$. 
Question
Does there always exist a $\mathcal{B}$-measurable function $Y:\mathbb{R}\rightarrow\mathbb{R}$ such that 


*

*$\sigma(X)\cap\sigma(Y)=\mathcal{A}$

*But neither is $\sigma(X)\subset\sigma(Y)$ nor $\sigma(Y)\subset\sigma(X)$.


It was easy for me to find a few specific examples where $\sigma(X)$ has only a finite number of elements, but I am interested in the general case.
EDIT: The example given by Eric answers the question as stated. But due to his comment and answer I noticed that I actually would like to understand something slightly(?) different. I am really interested in the case where $\mathcal{A}$ is also generated by a function, i.e. $\mathcal{A}=\sigma(f\circ X)$. The countable-uncountable sigma-algebra is not generated by a function since it is not countably generated (see here) but a sigma-algebra generated by a function is.
 A: This is certainly not always possible.  For instance, if $X$ is the identity function, then $\sigma(X)=\mathcal{B}$, so for any Borel-measurable $Y$, $\sigma(Y)\subseteq\sigma(X)$.
For a slightly less trivial example, let $X$ be given by $X(t)=t$ unless $t=0$ and $X(0)=1$.  Then $\sigma(X)$ is the algebra of all Borel sets that can't distinguish $0$ and $1$.  Let $\mathcal{A}$ consist of all elements of $\sigma(X)$ that are either countable or cocountable.  If $Y$ is Borel-measurable and $\mathcal{A}\subset\sigma (Y)$, then $Y$ must be injective on $\mathbb{R}\setminus\{0\}$; in particular, all the fibers of $Y$ must be countable.
Now let $$r=\inf\{r\in\mathbb{R}:Y^{-1}((r,\infty))\text{ is countable}\}$$ and $$s=\inf\{s\in\mathbb{R}:Y^{-1}((-\infty,s))\text{ is countable}\}.$$  Then clearly $s\leq r$, and in fact $s<r$ since if $r=s$ then the fact that $Y^{-1}(\{r\})$ is countable would imply $Y^{-1}(\mathbb{R})$ is countable.  Choose $t\in(s,r)$ and let $S=(-\infty,t)\setminus\{Y(0),Y(1)\}$.  Then $Y^{-1}(S)$ is Borel, is neither countable nor cocountable, and does not distinguish $0$ and $1$.  Thus $Y^{-1}(S)\in\sigma(X)\setminus\mathcal{A}$.  In particular, this shows that $\sigma(Y)\cap\sigma(X)$ cannot be equal to $\mathcal{A}$ for any Borel-measurable $Y$.
