I've been trying to implement a conditional Where and having problems. What I want to do is select only those customers that visited a beauty salon that had a haircut and also a manicure in the past year. The treatments don't have to be on the same day. e.g. If Susan had a manicure in the last 12 months, select all the times Susan had a haircut in the same time period. The table is structured so each visit is one row. e.g.
Customer Treatment Treatment_Date
Susan Manicure 12 Jan 2013
Susan Make-up 3 Feb 2013
Susan Haircut 14 Feb 2013
Susan Blow Dry 3 Mar 2013
Susan Haircut 21 Apr 2013
Betty Manicure 4 Jun 2013
Betty Haircut 7 July 2013
Tara Haircut 10 Aug 2013
So ideally I'd like to select Susan and Betty. Can this be done in one query or would it have to be broken up, like first select all customers that had a haircut, then from this select those that had a manicure.
Thanks in advance for your advice.
:)