SQL Case Studies

A growing set of SQL projects, each starting from a business question and ending in a Power BI report.

Role
Sole builder
Stack
SQL, Power BI
Status
Two complete

About the Projects

The other two projects each take a broad topic from many angles on a live site. These are smaller and more focused: a way to put my SQL and Power BI training to work on the kind of business questions a hiring manager would actually ask, and to show the analysis and visuals I can bring to real-world questions across a range of industries.

So the emphasis isn’t on query syntax but on the work around it: choosing what to measure, deciding what the data can’t tell you, and landing on a defensible answer. Each project below starts from a business question and ends in a Power BI report, with the SQL, the database, and the report file on GitHub so every query can be re-run.

Project 01 · Video Game Sales Data

Which genres, ratings, and titles actually drive video game sales?

A public Kaggle dataset of video game titles released between 1980 and 2017, with genre, platform, critic ratings, and unit sales broken out by region. It answers three questions a publisher’s planning team would ask before greenlighting a title: which genre leads in each region, whether ratings translate into sales, and whether a standalone title can compete with an established franchise.

What it showed

Which genre is the most popular in each region?

Action leads in every region except Japan, which prefers RPGs.

RegionTop GenrePercent of Sales
JapanRole-Playing27.4%
OtherAction23.3%
EuropeAction21.4%
North AmericaAction20.0%

How do sales relate to critic score, and by how much?

Titles rated “Great”, a critic score of 90 or above, sell best, averaging more than twice as many copies as “Good” titles. From there the decline is steady: the lower the rating, the lower the sales. One caveat: 51% of titles in the dataset have no critic score at all, including many early NES classics, so unrated titles are left out of this comparison.

Bar chart of average global sales per title by critic-score tier: Great about 2.8 million, Good about 1.2 million, Average about 0.6 million, Poor about 0.3 million.
Average sales per title by critic-score tier. “Great” is a score of 90 or above.

Which standalone titles compete with or outperform franchises?

Only one. Wii Sports, still a standalone title when the data was published, is the only non-franchise game whose sales compete with series like Call of Duty and Grand Theft Auto: it sold about a third as much as every Call of Duty title combined, and about 18% more than the entire Final Fantasy franchise. The takeaway: a launch title for a new Nintendo console can become a massive hit when it draws in people who weren’t gaming before.

Scatter plot of every franchise by number of titles against total global sales in millions. Call of Duty sits highest at about 250 million across 20 titles, with Pokemon, Grand Theft Auto, Madden, The Sims and Final Fantasy also labelled; Wii Sports, the one standalone shown in teal, sits at about 82 million from a single title.
Every franchise by number of titles against total global sales. Wii Sports, in teal, is the lone standalone in franchise territory.

View the Power BI dashboard (PDF) ↗

Project 02 · University Major Payoff

Which college majors actually pay for themselves?

A public Kaggle dataset of 30,000 graduates across 19 majors, each with the net cost of their degree, the debt they took on, ten years of earnings, and whether they interned and finished on time. The records are synthetic, generated rather than drawn from real students, but calibrated to published ROI research from Georgetown’s Center on Education and the Workforce, FREOPP, and the College Scorecard. The questions are the ones a student and their family weigh before choosing a major: which degrees pay off, how much the effort around the degree matters, and how quickly each one pays for itself.

What it showed

Which major has the best return on investment?

Electrical engineering. It has the highest average salary in the set, about $105,000 a year across the first ten years, and returns 759% on the cost of the degree. Engineering, computer science, and business analytics hold the top of the table, and only two majors come out negative on average: humanities and fine arts.

MajorAvg ROIAvg Salary
Electrical Engineering759%$105,063
Business Analytics676%$97,377
Chemical Engineering667%$97,379
Computer Science658%$96,675
Computer Engineering641%$94,172
Economics567%$89,359
Mechanical Engineering548%$87,533
Finance453%$79,838
Nursing451%$80,186
Business354%$71,688
Marketing191%$59,440
Biology181%$58,346
Communications98%$51,726
Criminal Justice60%$48,819
Education25%$45,944
Social Work19%$45,528
Psychology14%$44,983
Humanities−7%$43,579
Fine Arts−40%$40,885

How much do internships and finishing on time change the return?

Graduates who did both, the High Achievers, earned a higher return than those who did neither, the Minimalists, in all 19 majors. The gap matters most at the bottom of the table, where it decides whether a degree pays at all: Criminal Justice minimalists roughly broke even, at about $1,600 over ten years, while high achievers in the same major returned over $62,000. Fine arts is the one major the extra effort can’t rescue, still about −$28,000 at best, even though it costs only a few thousand dollars less than an electrical engineering degree.

One caution worth stating: the dataset was generated with internships and on-time completion already raising earnings and lowering cost, so the effect itself is an input rather than a discovery. What the analysis adds is where it is decisive. Near the top of the table it adds to a return that was already large; near the bottom it decides whether the degree pays for itself at all.

Horizontal bar chart of average net ten-year ROI by major, split into High Achievers, who interned and finished on time, and Minimalists, who did neither. Electrical engineering leads at about 650,000 dollars for high achievers; fine arts is negative for both groups.
Average net ten-year ROI by major. High Achievers interned and finished on time; Minimalists did neither.

Which degrees pay for themselves fastest?

The ones that pay the most. Average cost barely moves from one major to the next, varying by only a few thousand dollars, so how quickly a degree earns back what it cost is set almost entirely by salary. The payback order follows the salary table almost exactly: electrical engineering fastest, fine arts slowest. An electrical engineering degree costs less than one year of its graduates’ average salary; a fine arts degree costs more than two.

Scatter plot of average degree cost against the years of salary needed to cover it, one bubble per major, sized by average salary. Costs cluster between about 87,000 and 90,000 dollars; electrical engineering sits lowest at under one year and fine arts highest at just over two.
Average degree cost against years of salary needed to cover it. Cost barely varies by major, so salary sets the order.

View the Power BI dashboard (PDF) ↗

What’s next

A third project is likely to join these two. In the meantime, The Invest Lab and Football Forecast are both live.

View on GitHub ↗ Get in touch ↗ Next Project →