title: Teradata SQL: Error 4566 - Query failing for me but working for coworkers
body: <p>I inherited a query from coworkers that works for them. I have the same database access and set up my ODBC driver in the same way, although am using Teradata vs. Query Chameleon to run the query. The difference is that every time I run my query, I am getting: </p>
  
  <blockquote>
    <p>SELECT Failed. 4566: Relation "&lt;>" does not exist</p>
  </blockquote>
  
  <p>Is there any way to fix this query?</p>
  
  <p>(This is the simplest of the several queries that are all experiencing the same failure:)</p>
  
  <pre><code>SELECT CAST(DR.month_id AS INTEGER) AS DATE
      ,CAST(SUM(LD.Count) AS INTEGER) AS Count
      ,CAST(SUM(LD.revenue) AS FLOAT) AS Revenue 
      ,CAST(SUM(LD.revenue) / SUM(LD.Count)  AS FLOAT) AS AvgRevPerUnit 
      ,CAST(SUM(LD.Count) / SUM(LD.Count) AS FLOAT) AS AttachRate
  FROM database1                  AS OS
  INNER JOIN database2        AS LD ON (LD.id = OS.id)
  INNER JOIN database3                    AS LT ON (LD.id = LT.id)
  INNER JOIN database4            AS DR ON (LD.id = DR.id)
  INNER JOIN database5    AS FS ON (LD.id = FS.id)
  WHERE 0 = 0
      AND OS.desc IN ('Description I want')
      AND DR.year &gt;= (YEAR(current_date) - 2)
      AND LT.desc = ('ABREV')
      AND FS.code NOT IN ('CANCELED')
  GROUP BY 1
  ORDER BY 1
  </code></pre>