# denistanjingyu/stratascratch architecture

> Architecture diagram of the GitHub repository denistanjingyu/stratascratch, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/denistanjingyu/stratascratch
- Repository: https://github.com/denistanjingyu/stratascratch

## Overview

This repository is a catalog of standalone StrataScratch SQL challenge solutions, not an application with a shared runtime workflow. Each query addresses its own prompt; the tree and README do not document calls, data transfers, or a common execution entry point. The groups below organize the solutions by subject. SQL contents were not provided, so relationships between queries and their database dependencies cannot be established.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_business["Business &amp; commerce"]
  node_customer_details["Customer details"]
  node_customer_revenue["Customer revenue"]
  node_churros_activity["Churros activity"]
  node_global_company["Global profitable company"]
  node_ticket_processing["Ticket processing rates"]
  node_profitable_companies["Profitable companies"]
  node_highest_cost_orders["Highest-cost orders"]
end

subgraph group_work["People &amp; work"]
  node_average_salaries["Average salaries"]
  node_employee_manager["Employee salaries"]
  node_hack_popularity["Hack popularity"]
  node_police_captains["Police captain pay"]
  node_department_salary["Department salary leader"]
  node_manager_targets["Manager targets"]
  node_income_title_gender["Income by title and gender"]
end

subgraph group_places["Places &amp; services"]
  node_classify_business["Classify businesses"]
  node_roxanne_inspections["Inspection violations"]
  node_wineries["Wine aromas"]
  node_hotel_reviews["Hotel reviews"]
  node_library_emails["Library notices"]
  node_host_guest_matches["Host guest matches"]
  node_young_apartments["Young owners' apartments"]
  node_top_review_businesses["Top-reviewed businesses"]
  node_rental_host_popularity["Host rental prices"]
end

subgraph group_media["Media &amp; activity"]
  node_abigail_movies["Oscar-nominated movies"]
  node_macbook_events["User events"]
  node_heart_posts["Heart reactions"]
  node_spotify_artists["Spotify artists"]
  node_top_songs["Top-position songs"]
  node_cool_votes["Maximum cool votes"]
  node_songs_2010["2010 ranked songs"]
end

subgraph group_misc["Other analysis"]
  node_acceptance_rate["Acceptance rates"]
  node_counting_text["Count text instances"]
  node_updated_records["Updated records"]
  node_energy_consumption["Energy consumption"]
end

click node_acceptance_rate "https://github.com/denistanjingyu/stratascratch/blob/main/Acceptance%20Rate%20By%20Date.sql"
click node_average_salaries "https://github.com/denistanjingyu/stratascratch/blob/main/Average%20Salaries.sql"
click node_classify_business "https://github.com/denistanjingyu/stratascratch/blob/main/Classify%20each%20business%20as%20either%20a%20restaurant%2C%20cafe%2C%20taqueria%2C%20kitchen%2C%20garden%2C%20school%2C%20or%20other.sql"
click node_roxanne_inspections "https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20inspections%20with%20violations%20that%20happened%20to%20'Roxanne%20Cafe'%20in%20each%20year.sql"
click node_abigail_movies "https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20movies%20that%20Abigail%20Breslin%20nominated%20for%20oscar.sql"
click node_macbook_events "https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20user%20events%20performed%20by%20MacBookPro%20users.sql"
click node_counting_text "https://github.com/denistanjingyu/stratascratch/blob/main/Counting%20Instances%20in%20Text.sql"
click node_customer_details "https://github.com/denistanjingyu/stratascratch/blob/main/Customer%20Details.sql"
click node_customer_revenue "https://github.com/denistanjingyu/stratascratch/blob/main/Customer%20Revenue%20In%20March.sql"
click node_employee_manager "https://github.com/denistanjingyu/stratascratch/blob/main/Employee%20and%20Manager%20Salaries.sql"
click node_heart_posts "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20all%20posts%20which%20were%20reacted%20to%20with%20a%20heart.sql"
click node_wineries "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20all%20wineries%20which%20produce%20wines%20by%20possessing%20aromas%20of%20plum%2C%20cherry%2C%20rose%2C%20or%20hazelnut.sql"
click node_spotify_artists "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20artists%20that%20have%20been%20on%20Spotify%20the%20most%20number%20of%20times.sql"
click node_hotel_reviews "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20hotels%20with%20the%20highest%20number%20of%20reviews.sql"
click node_library_emails "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20libraries%20who%20haven't%20provided%20the%20email%20address%20in%202016%20but%20their%20notice%20preference%20definition%20is%20set%20to%20email.sql"
click node_host_guest_matches "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20matching%20hosts%20and%20guests%20in%20a%20way%20that%20they%20are%20both%20of%20the%20same%20gender%20and%20nationality.sql"
click node_top_songs "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20songs%20that%20have%20placed%20in%20the%20top%20position%20the%20most%20number%20of%20times.sql"
click node_churros_activity "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20activity%20date%20of%20churros%20when%20they%20had%20less%20than%2095%20points.sql"
click node_hack_popularity "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20average%20popularity%20of%20the%20Hack%20per%20office%20location.sql"
click node_police_captains "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20base%20pay%20for%20Police%20Captains.sql"
click node_cool_votes "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20highest%20number%20of%20'cool'%20votes%20a%20review%20received.sql"
click node_global_company "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20most%20profitable%20company%20in%20the%20financial%20sector%20of%20the%20entire%20world%20along%20with%20its%20continent.sql"
click node_young_apartments "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20number%20of%20apartments%20per%20nationality%20that%20are%20owned%20by%20people%20under%2030%20years%20old.sql"
click node_ticket_processing "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20rate%20of%20processed%20tickets%20for%20each%20type.sql"
click node_profitable_companies "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20three%20most%20profitable%20companies.sql"
click node_songs_2010 "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20top%2010%20ranked%20songs%20in%202010.sql"
click node_top_review_businesses "https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20top%205%20businesses%20with%20most%20reviews.sql"
click node_updated_records "https://github.com/denistanjingyu/stratascratch/blob/main/Finding%20Updated%20Records.sql"
click node_highest_cost_orders "https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Cost%20Orders.sql"
click node_energy_consumption "https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Energy%20Consumption.sql"
click node_department_salary "https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Salary%20In%20Department.sql"
click node_manager_targets "https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Target%20Under%20Manager.sql"
click node_rental_host_popularity "https://github.com/denistanjingyu/stratascratch/blob/main/Host%20Popularity%20Rental%20Prices.sql"
click node_income_title_gender "https://github.com/denistanjingyu/stratascratch/blob/main/Income%20By%20Title%20and%20Gender.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_customer_details,node_customer_revenue,node_churros_activity,node_global_company,node_ticket_processing,node_profitable_companies,node_highest_cost_orders toneBlue
class node_average_salaries,node_employee_manager,node_hack_popularity,node_police_captains,node_department_salary,node_manager_targets,node_income_title_gender toneAmber
class node_classify_business,node_roxanne_inspections,node_wineries,node_hotel_reviews,node_library_emails,node_host_guest_matches,node_young_apartments,node_top_review_businesses,node_rental_host_popularity toneMint
class node_abigail_movies,node_macbook_events,node_heart_posts,node_spotify_artists,node_top_songs,node_cool_votes,node_songs_2010 toneRose
class node_acceptance_rate,node_counting_text,node_updated_records,node_energy_consumption toneIndigo
```

## Components

### Business & commerce

- [Customer details](https://github.com/denistanjingyu/stratascratch/blob/main/Customer%20Details.sql): `Customer Details.sql`
- [Customer revenue](https://github.com/denistanjingyu/stratascratch/blob/main/Customer%20Revenue%20In%20March.sql): `Customer Revenue In March.sql`
- [Churros activity](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20activity%20date%20of%20churros%20when%20they%20had%20less%20than%2095%20points.sql): `Find the activity date of churros when they had less than 95 points.sql`
- [Global profitable company](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20most%20profitable%20company%20in%20the%20financial%20sector%20of%20the%20entire%20world%20along%20with%20its%20continent.sql): `Find the most profitable company in the financial sector of the entire world along with its continent.sql`
- [Ticket processing rates](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20rate%20of%20processed%20tickets%20for%20each%20type.sql): `Find the rate of processed tickets for each type.sql`
- [Profitable companies](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20three%20most%20profitable%20companies.sql): `Find the three most profitable companies.sql`
- [Highest-cost orders](https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Cost%20Orders.sql): `Highest Cost Orders.sql`

### People & work

- [Average salaries](https://github.com/denistanjingyu/stratascratch/blob/main/Average%20Salaries.sql): `Average Salaries.sql`
- [Employee salaries](https://github.com/denistanjingyu/stratascratch/blob/main/Employee%20and%20Manager%20Salaries.sql): `Employee and Manager Salaries.sql`
- [Hack popularity](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20average%20popularity%20of%20the%20Hack%20per%20office%20location.sql): `Find the average popularity of the Hack per office location.sql`
- [Police captain pay](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20base%20pay%20for%20Police%20Captains.sql): `Find the base pay for Police Captains.sql`
- [Department salary leader](https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Salary%20In%20Department.sql): `Highest Salary In Department.sql`
- [Manager targets](https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Target%20Under%20Manager.sql): `Highest Target Under Manager.sql`
- [Income by title and gender](https://github.com/denistanjingyu/stratascratch/blob/main/Income%20By%20Title%20and%20Gender.sql): `Income By Title and Gender.sql`

### Places & services

- [Classify businesses](https://github.com/denistanjingyu/stratascratch/blob/main/Classify%20each%20business%20as%20either%20a%20restaurant%2C%20cafe%2C%20taqueria%2C%20kitchen%2C%20garden%2C%20school%2C%20or%20other.sql): `Classify each business as either a restaurant, cafe, taqueria, kitchen, garden, school, or other.sql`
- [Inspection violations](https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20inspections%20with%20violations%20that%20happened%20to%20'Roxanne%20Cafe'%20in%20each%20year.sql): `Count the number of inspections with violations that happened to 'Roxanne Cafe' in each year.sql`
- [Wine aromas](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20all%20wineries%20which%20produce%20wines%20by%20possessing%20aromas%20of%20plum%2C%20cherry%2C%20rose%2C%20or%20hazelnut.sql): `Find all wineries which produce wines by possessing aromas of plum, cherry, rose, or hazelnut.sql`
- [Hotel reviews](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20hotels%20with%20the%20highest%20number%20of%20reviews.sql): `Find hotels with the highest number of reviews.sql`
- [Library notices](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20libraries%20who%20haven't%20provided%20the%20email%20address%20in%202016%20but%20their%20notice%20preference%20definition%20is%20set%20to%20email.sql): `Find libraries who haven't provided the email address in 2016 but their notice preference definition is set to email.sql`
- [Host guest matches](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20matching%20hosts%20and%20guests%20in%20a%20way%20that%20they%20are%20both%20of%20the%20same%20gender%20and%20nationality.sql): `Find matching hosts and guests in a way that they are both of the same gender and nationality.sql`
- [Young owners' apartments](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20number%20of%20apartments%20per%20nationality%20that%20are%20owned%20by%20people%20under%2030%20years%20old.sql): `Find the number of apartments per nationality that are owned by people under 30 years old.sql`
- [Top-reviewed businesses](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20top%205%20businesses%20with%20most%20reviews.sql): `Find the top 5 businesses with most reviews.sql`
- [Host rental prices](https://github.com/denistanjingyu/stratascratch/blob/main/Host%20Popularity%20Rental%20Prices.sql): `Host Popularity Rental Prices.sql`

### Media & activity

- [Oscar-nominated movies](https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20movies%20that%20Abigail%20Breslin%20nominated%20for%20oscar.sql): `Count the number of movies that Abigail Breslin nominated for oscar.sql`
- [User events](https://github.com/denistanjingyu/stratascratch/blob/main/Count%20the%20number%20of%20user%20events%20performed%20by%20MacBookPro%20users.sql): `Count the number of user events performed by MacBookPro users.sql`
- [Heart reactions](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20all%20posts%20which%20were%20reacted%20to%20with%20a%20heart.sql): `Find all posts which were reacted to with a heart.sql`
- [Spotify artists](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20artists%20that%20have%20been%20on%20Spotify%20the%20most%20number%20of%20times.sql): `Find artists that have been on Spotify the most number of times.sql`
- [Top-position songs](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20songs%20that%20have%20placed%20in%20the%20top%20position%20the%20most%20number%20of%20times.sql): `Find songs that have placed in the top position the most number of times.sql`
- [Maximum cool votes](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20highest%20number%20of%20'cool'%20votes%20a%20review%20received.sql): `Find the highest number of 'cool' votes a review received.sql`
- [2010 ranked songs](https://github.com/denistanjingyu/stratascratch/blob/main/Find%20the%20top%2010%20ranked%20songs%20in%202010.sql): `Find the top 10 ranked songs in 2010.sql`

### Other analysis

- [Acceptance rates](https://github.com/denistanjingyu/stratascratch/blob/main/Acceptance%20Rate%20By%20Date.sql): `Acceptance Rate By Date.sql`
- [Count text instances](https://github.com/denistanjingyu/stratascratch/blob/main/Counting%20Instances%20in%20Text.sql): `Counting Instances in Text.sql`
- [Updated records](https://github.com/denistanjingyu/stratascratch/blob/main/Finding%20Updated%20Records.sql): `Finding Updated Records.sql`
- [Energy consumption](https://github.com/denistanjingyu/stratascratch/blob/main/Highest%20Energy%20Consumption.sql): `Highest Energy Consumption.sql`
