Skip to content
Advertisement

MYSQL in AWS Athena

Using AWS Athena (so querying with MySql) I’m trying to retrieve information how many times the same IP has been logged. I have columns: timestamp, IP, country. I would like to count unique occurrences of each IP.

I’m trying with this query but results are wrong:

Thank you for helping achieving me this counter query.

EDIT:

Sample data:

Advertisement

Answer

If you only want to know how many times a certain IP has been logged, the IP should be the only column in your group by clause:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement