MySQL Forums
Forum List  »  Newbie

Simple query help
Posted by: Kyle Craig
Date: December 06, 2016 01:53PM

Hello, i am rather new to SQL and im having some struggles with queries. I have a general understanding of some statements. Like SELECT, COUNT, DISTINCT, and FROM. But i have the hardest time when it comes to grouping tables together or using sub queries i get highly confused and ends up leading to frustration and not figuring it out.
I have a database that has two tables both with the exact same columns and almost the same data. Its a database with geoip data.
Columns: visits id, ip, country_code, country_name, region_code, region_name, city, zip_code, time_zone, latitude, longitude, metro_code
So i just have a couple queries i would like help with.
This is what im trying to acheieve.

1.) How many rows/records ipv4 ips vs ipv6?
2.)List some non-US style zips (limit 10)
3.)Top 20 ip's with most visits.
4.)How many rows/records have NULLS/bad data?
5.)Counts of visits in Northern Hemisphere vs Southern Hemisphere

I really appreciate your time and help if there is any. Thanks

Options: ReplyQuote


Subject
Written By
Posted
Simple query help
December 06, 2016 01:53PM
December 06, 2016 02:21PM
December 07, 2016 07:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.