combining correct SQL syntax with Crystal Report
Posted on 2004-03-25
I am trying to get a count of unique ip's per unique UA. Listing all UA with count(ip) desc. Within SQL Query analyzer I am able to get the results by this syntax:
DROP TABLE #Tmp_Hosts
SELECT DISTINCT IP, UserAgent
SELECT UserAgent AS 'UA', COUNT(*) AS 'Hosts'
GROUP BY UA
ORDER BY Hosts DESC, UA
However, when using the 'add command' field in Crystal Reports it does not work.