Aliasing Tables in Reports
I'm trying to build a Query Table in Zoho Reports using my Zoho CRM data, and I'm running into this error:
Whenever a table alias is defined, kindly use table alias name before the respective columns used in SELECT query
I'm trying to create a query table that joins several aliases of the Contacts table to the Opportunities table. For example, an Opportunity has a Primary Contact, a Referral Source, a Primary Liaison, and an Agent. All four of these are represented in the Opportunities table by Contact Ids that are lookups on the Contacts table, and I need to be able to pull different information for each. Here's a sample query highly simplified.
Select
Opportunities."Amount",
Opportunities."Opportunity Name"
etc.
Contacts."Full Name",
Referrers."Full Name",
Liaisons."Full Name",
Agents."Full Name"
From Opportunities LEFT JOIN Contacts on Opportunities."Contact id"=Contacts."CONTACTID" LEFT JOIN Contacts AS Referrers ON Contacts."CONTACTID" = Opportunities."Referral Source" LEFT JOIN Contacts as Liaisons ON Contacts."CONTACTID" = Opportunties."Primary Liaison" etc.
Essentially, I need to alias the Contacts table four times, but I can't get it to alias even once!
Has anyone else had this difficulty?