-1

SELECT customer_id, payment, SUM(payment) FROM telemon_payments_data payments LEFT JOIN telemon_customer_data customer ON payments.customer_id = customer.customer_id GROUP BY 1 HAVING customer.account_created_on between 2016-01-01 and 2016-01-31

+++++++++++

evidently, my customer_id field is ambigious, because that's the error code. Thoughts? Thanks!

herbacidal
  • 39
  • 6

2 Answers2

0

as Mitch Wheat said, the problem is space in your 2nd table

use January Cohort AS January

or [January Cohort] AS January

0

The ambiguous customer_id error is because of the fact that both tables have a customer_id field. You need to tell the query which table to pull the column from (i.e., select customer.customer_id or select payment.customer_id).

highvoltage
  • 121
  • 1
  • 6