There are 3 queries I need to learn how to write in SQL Needed information that tables
Fantastic news! We've Found the answer you've been seeking!
Question:
There are 3 queries I need to learn how to write in SQL
Needed information that tables design, column names, data types, relations between tables are described in photo below.
1-)For each user, find the percentage of users that have fewer posts than them. Sort the results from high percentage to low, and limit the output to the 30 users with the highest post count. 2-)For each user, find the percentage of users that have spent less time on the site than them. Omit users whose first month was the last month in the data. Sort the results from high percentage to low, and limit the output to the 30 users with the highest post count. 3-)For each user, find the percentile they're in for time on site. We'll define percentile as the percentage of users who spent as much or less time on the site than the given user.
Related Book For
Statistics The Art and Science of Learning from Data
ISBN: 978-0321755940
3rd edition
Authors: Alan Agresti, Christine A. Franklin
Posted Date: