0
我有這樣的一個表:計數有兩個總條件
User_id, transaction_id, transaction_cost, transaction_type
1000, 2000, 123, a
1000, 2001, 234, a
1000, 2002, 345, b
1001, 2003, 456, b
1001, 2004, 567, b
,並希望得到這些user_ids,它滿足兩個條件:
1 - their summed transactions cost > 500
2 - the transactions they made have at least two types
有一個很好的方法來檢查兩個骨料在一個清晰的選擇條件,並獲得不同的user_ids列表作爲結果? 謝謝!
顯示你想要得到的結果。 –
我想通過我寫的兩個條件的user_ids – bry888