IT Security Operations
• | | •
[Microsoft Logo]
From: Petter von Dolwitz (Hem) [mailto:petter.von.dolw...@gmail.com]
Sent: Thursday, 5 June, 2014 01:33
To: user@hive.apache.org
Subject: Re: Help with query
I tried to answer this earlier. Maybe the mail got suck somewhere. I'll try
I tried to answer this earlier. Maybe the mail got suck somewhere. I'll try
again.
SELECT COUNT(DISTINCT ip) AS count, query_string
FROM myTable
GROUP BY query_string
ORDER BY count DESC;
This should give you one row per asked query. Rows are ordered by number of
unique IPs that asked the query.
can you put your example with sample data and expected result output?
On Fri, May 30, 2014 at 4:59 AM, Software Dev
wrote:
> We have a table with user entered queries, their IP. How could we
> write a query that will count and order queries by their count having
> a unique IP count > X. For exa
SELECT COUNT(DISTINCT ip) AS count, query_string
FROM myTable
GROUP BY query_string
ORDER BY count DESC;
This should give you one row per asked query. Rows are ordered by nummer of
unique IPs that asked the query. Most popular first.
Br,
Petter
Den 30 maj 2014 19:17 skrev "Software Dev" :
> We h