Query to know who paid more than 10k
One way to do this is do a select back to the table and sum the rows before the row, and then use that as an inner query to be able to use the sum in the where clause, something like this:

select *
from (
  select
    P1.ID,
    P1.CUSTOMER_ID,
    P1.DATEPAID,
    (select sum(P2.AMOUNT) 
      from PAYMENT P2 
      where P1.CUSTOMER_ID = P2.CUSTOMER_ID and 
      P2.DATEPAID &lt;= P1.DATEPAID and 
      P2.DATEPAID &gt;= dateadd(month, -12, P1.DATEPAID)) as PAID12M
  from
    PAYMENT P1
) X
where PAID12M &gt; 10000


Example in SQL Fiddle.

This will return all the rows where the criteria matches, if you need only customer_id or first row or something like that, you'll have to make the outer query a little bit more complex.