Skip to content

Joefb/codingtemple_SQL_Basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Basics - Homework Assignment


Instructions

Complete the following 10 questions using SQL queries against the social media database. Each question requires exactly one query unless otherwise specified. Do not use JOINs or subqueries.


Answer Format:

Question Prompt

Your Query

In comments: What you found as the answer and explain why, as if I can’t read data.

Questions

1. How many users have 'travel' in their bio?

Type: Counting, filtering by string pattern.

2. How many posts were created between May 1st and May 10th, 2023?

Type: Counting, filtering by date range.

3. What user has the most comments? (return the user_id)

Type: Aggregation, grouping, ordering, limiting.

4. How many users have usernames that end with 'er'?

Type: Counting, filtering by string pattern.

5. What post has the most comments? (return the post_id)

Type: Aggregation, grouping, ordering, limiting.

6. How many different user IDs have posted content?

Type: Counting distinct values.

7. What user has the most people following them? (return the user_id)

Type: Aggregation, grouping, ordering, limiting.

8. From users who joined in February 2023, how many have usernames containing 'john'?

Type: Counting, filtering by date and string pattern.

9. From users who joined in March 2023, how many have usernames containing 'mar'?

Type: Counting, filtering by date and string pattern.

10. What post has the most reactions? (return the post_id)

Type: Aggregation, grouping, ordering, limiting.

About

SQL Basics Homework Assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published