i am using mysql.
I have a table called zim_new_usa
I want a list of all emails which are of type aol and gmail
the table has a column called office state
there are 50 states in USA i want 500 emails from each state. I don't know how to write group function in query. the query i tried to use is
select * from zim_new_usa where
(email like '%@aol%' or email like '%@gmail%') and length(`office state`) = 2