 <p>You can simplify to:</p> <pre><code>SELECT expire_date - (expire_date - now()) - interval '1 month' FROM "License" WHERE license_id = 10 </code></pre> <p>This is valid without <em>additional</em> brackets because subtractions are evaluated from left to right.<br> <sub>In my first version the one necessary pair of brackets was missing, though.</sub></p> <p>This form of the query also prevents an error in the case that <code>license</code> should not be unique. You would get multiple rows instead. In that case, and if you should need it, add <code>LIMIT 1</code> guarantee a single value.</p> <hr> <p>@Milen diagnosed the cause of the error correctly. Experiment with these statements to see:</p> <pre><code>SELECT interval (interval '1 month'); -- error SELECT (interval '1 month')::interval; -- no error </code></pre> <p>However, the cure is simpler. Just don't add another cast, it is redundant.</p>