title: Getting "error": "<expression>,<operator>, GROUP, HAVING or ORDER expected got '('"
body: <p>IntelliJ IDEA Ultimate is showing me an error:</p>
  
  <blockquote>
    <p><code>&lt;expression&gt;,&lt;operator&gt;, GROUP, HAVING or ORDER expected got '('</code></p>
  </blockquote>
  
  <p>right under a braket inside a HQL statement which apperently is not a problem for compilation or runtime.</p>
  
  <pre class="lang-java prettyprint-override"><code>@Query("SELECT offer FROM OfferEntity offer " +
          "   JOIN offer.placeOwnership AS owner " +
          "   JOIN owner.place AS place " +
          "WHERE " +
          "   place.id = :placeId AND " +
          "   to_char(offer.dayFrom, 'yyyy-MM-dd') = :offerDate AND " +
                     ^
          &lt;expression&gt;,&lt;operator&gt;, GROUP, HAVING or ORDER expected got '('
          "   offer.repeating = false")
  List&lt;OfferEntity&gt; getAllForDate(@Param("placeId") Long placeId, @Param("offerDate") String offerDate);
  </code></pre>
  
  <p>Any idea why this is the case and how to get rid of this? It's annoying and missleading (presumably since the code is working).</p>
  
  <p><a href="https://i.stack.imgur.com/S57ig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S57ig.png" alt="enter image description here"></a></p>