Using Transaction Table to determine when and who sent initial response
Summary
I need to get the accounts.group_id of the employee who sent out the initial response transactions.acct_idContent
I have the Transaction Table at the Root and the Account table joined via an inner join. My expectation is to get data from the first row by using
Works | |||
MIN(if(transactions.trans_type=8,transactions.acct_id,incidents.assgn_acct_id)) | |||
Does Not Work | |||
MIN(if(transactions.trans_type=8,accounts.group_id,incidents.assgn_group_id)) |
.ref_no | incidents.created | transactions.trans_type | transactions.trans_type.id | transactions.acct_id | transactions.created | accounts.acct_id | accounts.full_name |
Tagged:
0