I have been trying to write a query where I have majority of information in one table and need information from just one column in the second table. Both table has a column that can be used as connection.
But unfortunately it does not give me the desired output. I am relatively new to coding and used PyPika to write my query. Can you please help?
It fives me "None" for "workflowtracker.COE" which I know there is data and many duplicate logs
Please find the query below
q = Query.from_(workflowtracker).join(activitylog).on(
activitylog.RequestId == workflowtracker.RequestId).select(workflowtracker.COE, activitylog.RequestId,
activitylog.SubjectLine,
activitylog.ResourceName, activitylog.ResourceEmail,
activitylog.GPN, activitylog.ExecutionDate,
activitylog.Status,
activitylog.TotalTimeTaken).where(
(activitylog.Status == "In Progress") & (activitylog.ExecutionDate == excecutiondate))
Please use this: