Column 'scheduled_date' in where clause is ambiguous