Advertisement
Guest User

Untitled

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