Last active
May 1, 2018 21:49
-
-
Save goggin13/d54ed675e9aebd4b162cc36260500c95 to your computer and use it in GitHub Desktop.
This file contains 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 | |
payment_instrument_detail_type, | |
M.company_name, | |
M.public_id, | |
merchant_fk, | |
count(*) | |
from gateway_production.transactions T | |
inner join gateway_production.merchants M ON | |
T.merchant_fk = M.pk | |
where | |
T.created_at > '2018-04-10 00:00:00' | |
and T.created_at < '2018-04-24 23:59:00' | |
and T.payment_instrument_detail_type = 'AndroidPayCardDetail' | |
group by 1,2,3,4 | |
order by 1,COUNT(*) DESC | |
limit 10 | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment