0
나는 나에게 지불TIMESTAMPDIFF
SELECT TIMESTAMPDIFF(SECOND, MIN(x.ts), MAX(x.ts))/(COUNT(DISTINCT(x.ts)) -1)
as average_minutes_between_paypal_orders
from (
select p.created_at as ts
from payment_tokens p
where status='processed' and payment_method = 'paypal'
order by created_at desc limit 100
) x
것은 내가 별도로,이 제시 '와 같은 다른 방법들 사이의 평균 시간은 diff를 원 사이의 평균 시간은 diff를 제시하는이 쿼리를 braintree ','other '등과 같고 여러 쿼리를 쓰고 싶지 않습니다.
1 개의 쿼리에 모든 payment_method를 별도로 제시 할 수 있습니까?