ms access - SQL using aggregate functions as filter criterias -


i'm trying use select query show customers in database made more 5 complaints in past. tried query:

select customer_id, count(customer_feedback.feedback_type) complaints customer_feedback complaints>5  group customer_id; 

but doesn't work. access not recognize expression 'complaints' in clause. tried this, worse:

select customer_id, count(customer_feedback.feedback_type) complaints customer_feedback count(customer_feedback.feedback_type)>1  group customer_id; 

i'm sure there's simple solution can't think of right now.

in sql server, "having" clause part of group by

select something, count(*) somewhere group having count(*) > 5 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -