$\{f>\alpha\} = \{g>\alpha\}$ a.e. for each $\alpha \in \mathbb{Q}$, then $f=g$ a.e. 
$\{f>\alpha\} = \{g>\alpha\}$ a.e. for each $\alpha \in \mathbb{Q}$,
   then $f=g$ a.e.

My argument:

 Using the fact that:
 $$\{f-g< \epsilon\} = \bigcup_{\alpha\in \mathbb{Q}} \{f\leq\alpha \} \cap \{\alpha < g+\epsilon\}$$
 if we replace $\{f\leq\alpha \} $ by $\{g\leq\alpha \} $, this shows the set $\{f-g< \epsilon\} \stackrel{a.e.}{=}  \{ g-g < \epsilon\}$ which has full measure.

The fact is easy to check but it is like a trick. Is there a maybe longer but more straight forward solution to this problem?
 A: Here's maybe a slightly quicker answer:
We have $\{f \neq g \} = \bigcup_{\alpha\in \mathbb{Q}}\{ f \le \alpha\} \cap \{g > \alpha\}$, and then since the measure of the individual set $\{ f \le \alpha\} \cap \{g > \alpha\}$ is zero for each $\alpha \in \mathbb{Q}$, $$\mu\left(\bigcup_{\alpha\in \mathbb{Q}}\{ f \le \alpha\} \cap \{g > \alpha\}\right) \le \sum_{\alpha \in \mathbb{Q}} \mu(\{ f \le \alpha\} \cap \{g > \alpha\}) = \sum_{\alpha \in \mathbb{Q}}0 = 0$$
A: You haven't specified, but it seems like $f,g$ are defined on $\Bbb R$. 
Perhaps a more structured way is to do it as follows: let $\lambda_n$ denote the restriction of Lebesgue measure to $[n,n+1]$, where $n\in \Bbb Z$. Let $(f,g):\Bbb R \to \Bbb R^2$ be given by $x\mapsto (f(x),g(x))$ and similarly $(f,f)$. 
Then from the given condition you may deduce that $\lambda_n\bigg((f,g)^{-1}\big((a,\infty) \times (b, \infty)\big)\bigg) = \lambda_n\bigg((f,f)^{-1}\big((a,\infty) \times (b, \infty)\big)\bigg)$. If two finite measures agree on a $\pi$-system generating the sigma-algebra, then they agree. Hence $\lambda_n((f,g)^{-1}(A))=\lambda_n((f,f)^{-1}(A))$ for all Borel $A \subset \Bbb R^2$. Setting $A=\{(x,y):x=y\}$ shows that $\lambda_n(f=g)=1$ for all $n$, hence $f=g$ a.e.
