Last active
August 29, 2015 14:16
-
-
Save asvechkar/eb0ca280e0cad5501c0a to your computer and use it in GitHub Desktop.
last transactions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Select | |
| acqt.transaction_id As transactnum | |
| , acqt.fld_007 As transactdate | |
| , acqt.fld_004 / 100 As amount | |
| , acqt.fld_042 As merchant_id | |
| , acqt.fld_002 As card_num | |
| , acqt.reader_sn As reader_num | |
| , acqt.mti As transtype | |
| , acqt.card_type As brand | |
| , COALESCE(uc.user_id, ue.client_id, 1010379) As client_id | |
| From acq_trans As acqt | |
| LEFT Join users_clients As uc on uc.user_id = acqt.user_id | |
| Left Join users_employes As ue on ue.user_id = acqt.user_id | |
| Left Join acq_batches as ab on ab.batch_id = acqt.batch_id | |
| Where acqt.fld_007 BETWEEN DATE_SUB(NOW(),INTERVAL 1 DAY) AND NOW() | |
| and ab.batch_type = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment