Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. SELECT CUSTOMERS.CUSTOMER_ID,CUSTOMERS.FIRST_NAME,CUSTOMERS.LAST_NAME,
  2. SUM (PAYMENTS.PAID_AMOUNT) as TOTAL_PAYMENTS
  3. FROM PAYMENTS
  4. INNER JOIN CUSTOMERS ON PAYMENTS.CUSTOMER_ID=CUSTOMERS.CUSTOMER_ID
  5. WHERE [TYPE] = 'i'
  6. GROUP BY CUSTOMERS.CUSTOMER_ID,CUSTOMERS.FIRST_NAME,CUSTOMERS.LAST_NAME,
  7. PAYMENTS.PAID_AMOUNT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement