I don't think SQL Server allows the use of ANY/ALL/SOME keywords in the context you are using. You can write the query like this:SELECT Tickets, COUNT(*) AS Total_Tickets, SUM(CASE WHEN Tickets LIKE 'a%' OR Tickets LIKE 'b%' OR Tickers LIKE 'c%' THEN 1 ELSE 0 END) AS Mail_Order, SUM(CASE WHEN Tickers NOT LIKE 'a%' AND Tickets NOT LIKE 'b%' AND Tickers NOT LIKE 'c%' THEN 1 ELSE 0 END) AS Web_orderFROM tblGROUP BY Tickers
You can of course, divide appropriately to get the percentages etc.