Hello,
I am having a problem writing an SQL query.
The tables I have are
History
id transaction_id state_id
1 1 1
2 1 2
3 1 3
4 1 5
5 2 1
6 2 2
7 2 3
8 2 4
And
Transactions
id
1
2
I want to be able to return a result that provides me only with the
transaction_id' s that do not contain a tuple in history where they have a
state_id of 4. So for example in the table above I would only want
transaction_id 1.
Thank you very much for any help and pointers you can give me
Cheers Chris
I am having a problem writing an SQL query.
The tables I have are
History
id transaction_id state_id
1 1 1
2 1 2
3 1 3
4 1 5
5 2 1
6 2 2
7 2 3
8 2 4
And
Transactions
id
1
2
I want to be able to return a result that provides me only with the
transaction_id' s that do not contain a tuple in history where they have a
state_id of 4. So for example in the table above I would only want
transaction_id 1.
Thank you very much for any help and pointers you can give me
Cheers Chris
Comment