I am trying to create a query where I am bringing back order_date, ip_address and email_address. I only want those records where the count of the ip_address is greater than 2.
Here is my code.
select
count(ip_address)
order_date,
email,
ip_address
from risk.fraud_orders
where sales_district = "IN02"
and order_date >= "2005-01-01"
and count(ip_address) > 2;
I get an illegal group by function. What do I need to do to fix this code?
Thanks
Bill
Here is my code.
select
count(ip_address)
order_date,
email,
ip_address
from risk.fraud_orders
where sales_district = "IN02"
and order_date >= "2005-01-01"
and count(ip_address) > 2;
I get an illegal group by function. What do I need to do to fix this code?
Thanks
Bill